code: func (p *PathSpec) AbsURL(in string, addLanguage bool) string {
  	url, err := url.Parse(in)
  	if err != nil {
  		return in
  	}
  
  	if url.IsAbs() || strings.HasPrefix(in, "//") {
  		return in
  	}
  
  	var baseURL string
  	if strings.HasPrefix(in, "/") {
  		u := p.BaseURL.URL()
  		u.Path = ""
  		baseURL = u.String()
  	} else {
  		baseURL = p.BaseURL.String()
  	}
  
  	if addLanguage {
  		prefix := p.GetLanguagePrefix()
  		if prefix != "" {
  			hasPrefix := false
  			// avoid adding language prefix if already present
  			if strings.HasPrefix(in, "/") {
  				hasPrefix = strings.HasPrefix(in[1:], prefix)
  			} else {
  				hasPrefix = strings.HasPrefix(in, prefix)
  			}
  
  			if !hasPrefix {
  				addSlash := in == "" || strings.HasSuffix(in, "/")
  				in = path.Join(prefix, in)
  
  				if addSlash {
  					in += "/"
  				}
  			}
  		}
  	}
  	return MakePermalink(baseURL, in).String()
  }
docs: // AbsURL creates an absolute URL from the relative path given and the BaseURL set in config.