diff options
author | Mitchell Cohen <mitchell@agilebits.com> | 2016-09-16 22:48:42 +0300 |
---|---|---|
committer | digitalcraftsman <digitalcraftsman@protonmail.com> | 2016-09-17 12:23:47 +0300 |
commit | 56afd943a8451feec3d2230ed5cbae1701c2be62 (patch) | |
tree | 1394f28d4966cdd0bcecd39048cbbb2a5c94124a /docs | |
parent | 51c9bfbc9ef96ca237fef1fb65baedd2a5ff3815 (diff) |
docs: Add multilingual alias example
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/extras/aliases.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/content/extras/aliases.md b/docs/content/extras/aliases.md index ec7dc6950..9d20e12ba 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. |