Registry / devops / mkdocs-auto-tag-plugin

mkdocs-auto-tag-plugin

JSON →
library0.1.3pypypi✓ verified 23d ago

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-plugin
INSTALL
IMPORT
SIG · MKDOCS-AUTO-TAG-PL
M
mkdocs-auto-tag-plugin
devopspythonv0.1.3
Install
3.1s avg
Import
Disk
32MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 33.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.1s · import 0.000s · 34MB
32MB installed
● package 32MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

auto_tag
plugins: - auto_tag:
MkDocs plugins are typically configured in mkdocs.yml, not directly imported in Python code.

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

plugins: - auto_tag: rules: - pattern: '.*_API_Reference\.md$' tags: - 'API-Reference' - pattern: 'dev_guide/.*' tags: - 'Development-Guide' - pattern: 'docs/README.md' tags: - 'Home'
mkdocs --version
Debug
Known issues
breakingMkDocs 2.0 is being rewritten without a plugin system, which will make this plugin and other existing MkDocs 1.x plugins incompatible. Material for MkDocs has already limited its version range to '<2' to avoid breakage. Plan for alternative solutions or remain on MkDocs 1.x if relying on plugins.
fix
Remain on MkDocs 1.x or identify an alternative tagging solution compatible with MkDocs 2.0 when it is released.
affects: MkDocs >= 2.0
gotchaThere is another MkDocs plugin named `mkdocs-auto-tags` (note the plural 'tags' and hyphen) by a different author, which has similar functionality but potentially different configuration and behavior. Ensure you are installing and configuring the correct `mkdocs-auto-tag-plugin` as intended.
fix
Double-check the PyPI name (`mkdocs-auto-tag-plugin`) and refer to its specific documentation for configuration.
affects: All versions
gotchaThe order of plugins in your `mkdocs.yml` can be critical. If you are using `mkdocs-auto-tag-plugin` in conjunction with other tag-related plugins (like the built-in `tags` plugin from Material for MkDocs), ensure `auto_tag` is placed appropriately in the plugin list, usually after any official `tags` plugin if it modifies the tag list.
fix
Experiment with plugin order if unexpected behavior occurs. Consult documentation for specific plugin interactions.
affects: All versions
gotchaThis plugin appends tags to pages based on its rules without overwriting any tags already defined in the page's front matter. If a page explicitly defines tags, the automatically generated tags will be added alongside them.
fix
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.
affects: All versions
Upgrade
Version history
0.1.3latest on PyPI · released Aug 1, 2023
Audit
Dependencies
mkdocsrequiredThis is an MkDocs plugin and requires MkDocs to function.
pythonrequiredRequires Python 3.9 or newer.
Agent activity
3 hits · last 30 days
node
2
Resources
mkdocs-auto-tag-plugin — pip install mkdocs-auto-tag-plugin · libregistry