summaryrefslogtreecommitdiffstats
path: root/docs/content/templates/functions.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content/templates/functions.md')
-rw-r--r--docs/content/templates/functions.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/content/templates/functions.md b/docs/content/templates/functions.md
index aa55ced4f..5fb540065 100644
--- a/docs/content/templates/functions.md
+++ b/docs/content/templates/functions.md
@@ -787,6 +787,13 @@ e.g.: `{{ i18n "translation_id" }}`
* `{{ mul 1000 (time "2016-05-28T10:30:00.00+10:00").Unix }}` → 1464395400000 (Unix time in milliseconds)
## URLs
+### absLangURL, relLangURL
+These are similar to the `absURL` and `relURL` relatives below, 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://mysite.com/hugo/` and the current language is `en`:
+
+* `{{ "blog/" | absLangURL }}` → "http://mysite.com/hugo/en/blog/"
+* `{{ "blog/" | relLangURL }}` → "/hugo/en/blog/"
### absURL, relURL