You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MkDocs allows arbitrary YAML frontmatter in markdown documents. This plugin enforces arbitrary required frontmatter for pages in the documentation pages. This may be especially useful if you have post-processing scripts that rely on certain frontmatter existing in your documents.
Setup
Install the plugin using pip3 with the following command:
pip3 install mkdocs-required-frontmatter-plugin
Next, in your mkdocs.yml, add the following lines:
plugins:
- required-frontmatter
Configuration Options
enabled allows you to disable the plugin, for instace in different build environments that shouldn't require it.
plugins:
- required-frontmatterenabled: true
required_keys specifies the frontmatter keys that the plugin will search for on all documents.
plugins:
- required-frontmatterrequired_keys:
- title
- author
- description
exclude is a list of files or directories in the /docs folder that this plugin will ignore. It accepts exact paths and glob-style strings to ignore entire directories or file types.