hugo/docs/content/en/functions/urls.Parse.md
2022-11-17 16:16:19 +01:00

662 B

title description date publishdate lastmod categories menu keywords signature workson hugoversion deprecated aliases
urls.Parse Parse parses a given url, which may be relative or absolute, into a URL structure. 2017-09-25 2017-09-25 2017-09-25
functions
docs
parent
functions
urls
urls.Parse URL
false

urls.Parse takes a url as input

{{ $url := urls.Parse "http://www.gohugo.io" }}

and returns a URL structure. The struct fields are accessed via the . notation:

{{ $url.Scheme }} → "http"
{{ $url.Host }} → "www.gohugo.io"