code: func (p *PathSpec) PermalinkForBaseURL(link, baseURL string) string {
  	link = strings.TrimPrefix(link, "/")
  	if !strings.HasSuffix(baseURL, "/") {
  		baseURL += "/"
  	}
  	return baseURL + link
  
  }
docs: // PermalinkForBaseURL creates a permalink from the given link and baseURL.