From 3cf36a7fcd836fd88b9601af7c4a301244f5ad0d Mon Sep 17 00:00:00 2001 From: Luke Rijk de Waal <36196737+LukeDeWaal@users.noreply.github.com> Date: Tue, 7 Nov 2023 19:16:51 +0100 Subject: [PATCH] Clarify lang keyword Co-authored-by: Joe Mooring --- content/en/content-management/front-matter.md | 6 ++++++ content/en/getting-started/configuration.md | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/content/en/content-management/front-matter.md b/content/en/content-management/front-matter.md index 0b272c687..dba67ba10 100644 --- a/content/en/content-management/front-matter.md +++ b/content/en/content-management/front-matter.md @@ -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` diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md index 897fb9587..78cc6b52d 100644 --- a/content/en/getting-started/configuration.md +++ b/content/en/getting-started/configuration.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