Skip to content

Commit

Permalink
Added note on order of meta and blog plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed Sep 12, 2022
1 parent a4a1a27 commit e9092a6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/reference/index.md
Expand Up @@ -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.
Expand All @@ -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
Expand Down
10 changes: 10 additions & 0 deletions docs/setup/setting-up-a-blog.md
Expand Up @@ -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.
Expand Down

0 comments on commit e9092a6

Please sign in to comment.