From 635b3bb4eb873978c7d52e6c0cb85da0c4d25299 Mon Sep 17 00:00:00 2001 From: xavi blanch Date: Tue, 2 May 2017 18:31:06 +0200 Subject: [PATCH] docs: Add documentation on slug translation --- docs/content/content/multilingual.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/content/content/multilingual.md b/docs/content/content/multilingual.md index 6dfb1d32d..5e09bc539 100644 --- a/docs/content/content/multilingual.md +++ b/docs/content/content/multilingual.md @@ -96,6 +96,16 @@ If left unspecified, the value for `defaultContentLanguage` defaults to `en`. By having the same _base file name_, the content pieces are linked together as translated pieces. +If you need distinct URLs per language you can set the slug in the non-default language file. Just define the custom slug for the french translation in your `/content/about.fr.md` file: + +``` +--- +slug: "a-propos" +--- +``` + +You will get both `/about/` and `/a-propos/` URLs in your build, properly linked as translated pieces. + ### Link to translated content To create a list of links to translated content, use a template similar to this: