Skip to content

Commit

Permalink
Clarify lang keyword
Browse files Browse the repository at this point in the history
Co-authored-by: Joe Mooring <[email protected]>
  • Loading branch information
LukeDeWaal and jmooring authored Nov 7, 2023
1 parent f10d649 commit 3cf36a7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions content/en/content-management/front-matter.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
10 changes: 9 additions & 1 deletion content/en/getting-started/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 3cf36a7

Please sign in to comment.