Skip to content

Commit

Permalink
docs: Add documentation on slug translation
Browse files Browse the repository at this point in the history
  • Loading branch information
xavib authored and digitalcraftsman committed May 2, 2017
1 parent 08c0de5 commit 635b3bb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/content/content/multilingual.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 635b3bb

Please sign in to comment.