From e9092a6c7f756927a12deeb78b64376560ca76e5 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Mon, 12 Sep 2022 18:11:47 +0200 Subject: [PATCH] Added note on order of meta and blog plugin --- docs/reference/index.md | 7 ++++++- docs/setup/setting-up-a-blog.md | 10 ++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/reference/index.md b/docs/reference/index.md index 2d2826031..e51bdc5b0 100644 --- a/docs/reference/index.md +++ b/docs/reference/index.md @@ -24,9 +24,13 @@ tags. Add the following lines to `mkdocs.yml`: ``` yaml plugins: - - meta + - meta # (1)! ``` +1. Note that the meta plugin should be located at the beginning of the list + of `plugins`, so that other plugins (including the [built-in blog plugin]) + will pick up the set defaults. + > If you need to be able to build your documentation with and without > [Insiders], please refer to the [built-in plugins] section to learn how > shared configurations help to achieve this. @@ -48,6 +52,7 @@ The following configuration options are available: 1. Note that it's strongly recommended to prefix meta files with a `.`, since otherwise they would be included in the build output. + [built-in blog plugin]: ../setup/setting-up-a-blog.md#built-in-blog-plugin [built-in plugins]: ../insiders/getting-started.md#built-in-plugins ## Usage diff --git a/docs/setup/setting-up-a-blog.md b/docs/setup/setting-up-a-blog.md index a51556541..b4e65629d 100644 --- a/docs/setup/setting-up-a-blog.md +++ b/docs/setup/setting-up-a-blog.md @@ -1165,6 +1165,16 @@ authors, and add a `.meta.yml` file to set common properties: - World ``` +Note that order matters – the [built-in meta plugin] must be defined before the +blog plugin in `mkdocs.yml`, so that all set defaults are correctly picked up +by the [built-in blog plugin]: + +``` yaml +plugins: + - meta + - blog +``` + Lists and dictionaries in `.meta.yml` files are merged and deduplicated with the values defined for a post, which means you can define common properties in `.meta.yml` and then add specific properties or overrides for each post.