Skip to main content

MkDocs plugin that automatically tags pages based on their navigation section

Project description

mkdocs-auto-tags

MkDocs plugin that automatically tags pages based on their position in the navigation hierarchy.

Works with any MkDocs project — single repo, multirepo, or manual nav configuration.

Installation

pip install mkdocs-auto-tags

Usage

Add the plugin to your mkdocs.yml:

plugins:
  - search
  - tags
  - auto-tags

Note: The tags plugin must be listed before auto-tags.

Every page will be automatically tagged with its parent navigation section name. For example, a page under API > Authentication gets tagged with Authentication.

Configuration

plugins:
  - auto-tags:
      enabled: true        # Enable/disable the plugin (default: true)
      all_ancestors: false  # Tag with all ancestor sections, not just the immediate parent (default: false)

all_ancestors

When false (default), a page under Development > API > Authentication gets a single tag: Authentication.

When true, the same page gets three tags: Development, API, Authentication.

Example

Given this navigation structure:

Development/
  API/
    Authentication/
      README.md      → tagged: Authentication
      deployment.md  → tagged: Authentication
    Deployment/
      README.md      → tagged: Deployment
  Infrastructure/
    README.md        → tagged: Infrastructure

Pages that already have tags in their front matter will keep them — the plugin appends without duplicating.

Compatibility

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocs_auto_tags-0.1.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_auto_tags-0.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_auto_tags-0.1.0.tar.gz.

File metadata

  • Download URL: mkdocs_auto_tags-0.1.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mkdocs_auto_tags-0.1.0.tar.gz
Algorithm Hash digest
SHA256 eb0958325d2b072a57bf9574a3ee4bbd15475a6c362bd7b46eb3075a8ee053b2
MD5 7b7d64ec3aca2d951a19b4146b22eff3
BLAKE2b-256 5f296bba838d45b7b286f2a1a0cc7b304baec2f8033a4e084f74c70b25daf79c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_auto_tags-0.1.0.tar.gz:

Publisher: publish.yml on czarny/mkdocs-auto-tags

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mkdocs_auto_tags-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_auto_tags-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d21ddb86be3f3ef995ac84b4322852f91a2c50a4bb298ce6f002ce20dafcc1a
MD5 2a8820e796e519e53e091e70a9dac163
BLAKE2b-256 3cd0bbf1d7155e2c3d20fdb9fc02138ae17f975e8238dec58a3935ddda994a04

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_auto_tags-0.1.0-py3-none-any.whl:

Publisher: publish.yml on czarny/mkdocs-auto-tags

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page