mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 23:38:53 +00:00
Clarify lang keyword
Co-authored-by: Joe Mooring <joe.mooring@veriphor.com>
This commit is contained in:
committed by
GitHub
parent
f10d6495d3
commit
3cf36a7fcd
@@ -187,6 +187,12 @@ environment
|
||||
|
||||
Any of the above can be omitted.
|
||||
|
||||
{{% note %}}
|
||||
When making a site that supports multiple languages, defining a `[[cascade]]` is recommended to be done in [Site Config](../../getting-started/configuration/#cascade) to prevent duplication.
|
||||
|
||||
If you instea define a `[[cascade]]` in front matter for multiple languages, an `content/XX/foo/_index.md` file needs to be made on a per-language basis, with `XX` the glob pattern matching the Page's language. In this case, the **lang** keyword is ignored.
|
||||
{{% /note %}}
|
||||
|
||||
### Example
|
||||
|
||||
In `content/blog/_index.md`
|
||||
|
||||
@@ -190,7 +190,15 @@ See [Configure File Caches](#configure-file-caches)
|
||||
|
||||
### cascade
|
||||
|
||||
Pass down default configuration values (front matter) to pages in the content tree. The options in site configuration is the same as in page front matter, see [Front Matter Cascade](/content-management/front-matter#front-matter-cascade).
|
||||
Pass down down default configuration values (front matter) to pages in the content tree.
|
||||
The options in site config is the same as in page front matter, see [Front Matter Cascade](/content-management/front-matter#front-matter-cascade).
|
||||
|
||||
{{% note %}}
|
||||
For a website in a single language, define the `[[cascade]]` in [Front Matter](/content-management/front-matter#front-matter-cascade).
|
||||
For a multilingual website, define the `[[cascade]]` in [Site Config](../../getting-started/configuration/#cascade).
|
||||
|
||||
To remain consistent and prevent unexpected behaviour, do not mix these strategies.
|
||||
{{% /note %}}
|
||||
|
||||
### canonifyURLs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user