hugoDocs/content/functions/abslangurl.md
2017-03-27 16:32:31 -05:00

907 B

title linktitle description godocref date publishdate lastmod categories tags ns signature workson hugoversion relatedfuncs deprecated aliases needsexamples
abslangurl absLangURL Adds the absolute URL with correct language prefix according to site configuration for multilingual. 2017-02-01 2017-02-01 2017-02-01
functions
multilingual
i18n
urls
absLangURL INPUT
relLangURL
false
true

Both absLangURL and relLangURL 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.

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/"