From: Mitchell Cohen Date: Fri, 16 Sep 2016 19:48:42 +0000 (-0400) Subject: docs: Add multilingual alias example X-Git-Tag: v0.17~49 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=56afd943;p=brevno-suite%2Fhugo docs: Add multilingual alias example --- diff --git a/docs/content/extras/aliases.md b/docs/content/extras/aliases.md index ec7dc695..9d20e12b 100644 --- a/docs/content/extras/aliases.md +++ b/docs/content/extras/aliases.md @@ -62,6 +62,19 @@ and the complete filename or directory.* 2. *Aliases are rendered prior to any content and will be overwritten by any content with the same location.* +## Multilingual example + +On [multilingual sites]({{< relref "content/multilingual.md" >}}), each translation of a post can have unique aliases. To use the same alias across multiple languages, prefix it with the language code. + +In `/posts/my-new-post.es.md`: + +```yaml +--- +aliases: + - /es/posts/my-original-post/ +--- +``` + ## How Hugo Aliases Work When aliases are specified, Hugo creates a physical folder structure to match the alias entry, and, an html file specifying the canonical URL for the page, and a redirect target.