mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 23:12:10 -05:00
docs: Convert code in multilingual.md to TOML
There was a mix of TOML and YAML in the first example config.
This commit is contained in:
parent
ec34ed0520
commit
441476b6c5
1 changed files with 16 additions and 15 deletions
|
@ -14,25 +14,26 @@ Hugo supports multiple languages side-by-side (added in `Hugo 0.17`). Define the
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
```
|
```
|
||||||
defaultContentLanguage = "en"
|
DefaultContentLanguage = "en"
|
||||||
|
copyright = "Everything is mine"
|
||||||
|
|
||||||
Languages:
|
[Languages]
|
||||||
en:
|
[Languages.en]
|
||||||
weight: 1
|
title = "My blog"
|
||||||
title: "My blog"
|
weight = 1
|
||||||
params:
|
[Languages.en.params]
|
||||||
linkedin: "english-link"
|
linkedin = "english-link"
|
||||||
fr:
|
|
||||||
weight: 2
|
[Languages.fr]
|
||||||
title: "Mon blog"
|
copyright = "Tout est à moi"
|
||||||
params:
|
title = "Mon blog"
|
||||||
linkedin: "lien-francais"
|
weight = 2
|
||||||
copyright: "Tout est à moi"
|
[Languages.fr.params]
|
||||||
|
linkedin = "lien-francais"
|
||||||
|
|
||||||
copyright: "Everything is mine"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Anything not defined in a `[lang]:` block will fall back to the global
|
Anything not defined in a `[Languages]` block will fall back to the global
|
||||||
value for that key (like `copyright` for the English (`en`) language in this example).
|
value for that key (like `copyright` for the English (`en`) language in this example).
|
||||||
|
|
||||||
With the config above, all content, sitemap, RSS feeds, paginations
|
With the config above, all content, sitemap, RSS feeds, paginations
|
||||||
|
|
Loading…
Reference in a new issue