1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-12 10:00:52 +01:00

Added note on order of meta and blog plugin

This commit is contained in:
squidfunk 2022-09-12 18:11:47 +02:00
parent a4a1a27283
commit e9092a6c7f
2 changed files with 16 additions and 1 deletions

View File

@ -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

View File

@ -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.