The mkdocs-auto-tag-plugin is an MkDocs plugin designed to automatically add tags to documentation pages based on their file path or name. It uses glob patterns and regular expressions to define rules for tag assignment. The current version is 0.1.3, released in August 2023, and it is actively maintained with a focus on MkDocs 1.x compatibility.
pip install mkdocs-auto-tag-pluginVerified import paths — ran on the pinned version, not inferred.
To enable the plugin, add `auto_tag` to your `plugins` section in `mkdocs.yml` and define tagging rules using `pattern` (glob or regex) and `tags`. This example tags files ending with '_API_Reference.md' as 'API-Reference' and files within 'dev_guide/' as 'Development-Guide'.
Remain on MkDocs 1.x or identify an alternative tagging solution compatible with MkDocs 2.0 when it is released.
Double-check the PyPI name (`mkdocs-auto-tag-plugin`) and refer to its specific documentation for configuration.
Experiment with plugin order if unexpected behavior occurs. Consult documentation for specific plugin interactions.
Be aware that existing front matter tags will persist and auto-tags will be additive. Adjust front matter tags or plugin rules accordingly if you require specific tag sets.