mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-25 07:48:52 +00:00
7fd64f19c8
It's a beautiful thing. A thousand thanks, Bud. See PR rdwatters/hugo-docs-concept#118
1.0 KiB
1.0 KiB
title, description, godocref, date, publishdate, lastmod, tags, categories, menu, ns, signature, workson, hugoversion, relatedfuncs, deprecated, aliases, needsexamples
| title | description | godocref | date | publishdate | lastmod | tags | categories | menu | ns | signature | workson | hugoversion | relatedfuncs | deprecated | aliases | needsexamples | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| rellangurl | Adds the relative URL with correct language prefix according to site configuration for multilingual. | 2017-02-01 | 2017-02-01 | 2017-02-01 |
|
|
|
|
false | true |
absLangURL and relLangURL functions are similar to their absURL and relURL relatives but will add the correct language prefix when the site is configured with more than one language. (See Configuring Multilingual.)
So for a site baseURL set to http://yoursite.com/hugo/ and the current language is en:
{{ "blog/" | absLangURL }} → "http://yoursite.com/hugo/en/blog/"
{{ "blog/" | relLangURL }} → "/hugo/en/blog/"