@@ -27,6 +27,45 @@ See additional configuration options:
2727 [front matter]: https://jekyllrb.com/docs/front-matter/
2828 [Metadata]: ../setup/extensions/python-markdown.md#metadata
2929
30+ ### Built-in meta plugin :material-alert-decagram:{ .mdx-pulse title="Added on July 17, 2022" }
31+
32+ [:octicons-heart-fill-24:{ .mdx-heart } Sponsors only][Insiders]{ .mdx-insiders } ·
33+ [:octicons-tag-24: insiders-4.21.0][Insiders] ·
34+ :octicons-cpu-24: Plugin ·
35+ :octicons-beaker-24: Experimental
36+
37+ The built-in meta plugin allows to __set front matter per folder__, which is
38+ especially handy to ensure that all pages in a folder use specific templates or
39+ tags. Add the following lines to ` mkdocs.yml`:
40+
41+ ` ` ` yaml
42+ plugins:
43+ - meta
44+ ` ` `
45+
46+ > If you need to be able to build your documentation with and without
47+ > [Insiders], please refer to the [built-in plugins] section to learn how
48+ > shared configurations help to achieve this.
49+
50+ The following configuration options are available :
51+
52+ ` meta_file` { # meta-file }
53+
54+ : :octicons-milestone-24 : Default: `**/.meta.yml` – This option specifies the
55+ name of the meta files that the plugin should look for. The default setting
56+ assumes that meta files are called `.meta.yml` :
57+
58+ ` ` ` yaml
59+ plugins:
60+ - meta:
61+ meta_file: '**/.meta.yml' # (1)!
62+ ` ` `
63+
64+ 1. Note that it's strongly recommended to prefix meta files with a `.`,
65+ since otherwise they would be included in the build output.
66+
67+ [built-in plugins] : ../insiders/getting-started.md#built-in-plugins
68+
3069# # Usage
3170
3271# ## Setting the page title
@@ -117,7 +156,18 @@ template: custom.html
117156...
118157` ` `
119158
159+ ??? question "How to set a page template for an entire folder?"
160+
161+ With the help of the [built-in meta plugin], you can set a custom template
162+ for an entire section and all nested pages, by creating a `.meta.yml`
163+ in the corresponding folder with the following content :
164+
165+ ` ` ` yaml
166+ template: custom.html
167+ ` ` `
168+
120169 [theme extension] : ../customization.md#extending-the-theme
170+ [built-in meta plugin] : # built-in-meta-plugin
121171
122172# # Customization
123173
0 commit comments