mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-17 07:56:07 -04:00
Update slug translation in multilingual.md
Closes rdwatters/hugo-docs-concept#107
This commit is contained in:
parent
f485766151
commit
9c17fcb4b7
@ -108,6 +108,15 @@ If left unspecified, the default value for `defaultContentLanguage` is `en`.
|
||||
|
||||
By having the same *base filename*, 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. For example, you can define a custom slug for a French translation in the front matter of `content/about.fr.md` as follows:
|
||||
|
||||
```yaml
|
||||
slug: "a-propos"
|
||||
|
||||
```
|
||||
|
||||
At render, Hugo will build both `/about/` and `/a-propos/` as properly linked translated pages.
|
||||
|
||||
## Link to Translated Content
|
||||
|
||||
To create a list of links to translated content, use a template similar to the following:
|
||||
|
Loading…
x
Reference in New Issue
Block a user