URL functions
Use these functions to work with URLs.
Use these functions to work with URLs.
urls.AbsLangURL INPUT ⟼ stringReturns an absolute URL with a language prefix, if any. Read More »
urls.AbsURL INPUT ⟼ stringReturns an absolute URL. Read More »
urls.Anchorize INPUT ⟼ stringReturns the given string, sanitized for usage in an HTML id attribute. Read More »
urls.JoinPath ELEMENT... ⟼ stringJoins the provided elements into a URL string and cleans the result of any ./ or ../ elements. If the argument list is empty, JoinPath returns an empty string. Read More »
urls.Parse URL ⟼ url.URLParses a URL into a URL structure. Read More »
urls.Ref PAGE PATH ⟼ stringReturns the absolute permalink to a page at the given path. Read More »
urls.RelLangURL INPUT ⟼ stringReturns a relative URL with a language prefix, if any. Read More »
urls.RelRef PAGE PATH ⟼ stringReturns the relative permalink to a page at the given path. Read More »
urls.RelURL INPUT ⟼ stringReturns a relative URL. Read More »
urls.URLize INPUT ⟼ stringReturns the given string, sanitized for usage in a URL. Read More »