Skip to main content

A mkdocs plugin that excludes files based on a list of frontmatter tags from being included in the final mkdocs output.

Project description

MKDocs Exclude Tagged Files

A simple plugin for excluding files from being included in the mkdocs output based on tags in their frontmatter.

Installation

Run pip install --upgrade mkdocs-exclude-tagged-files

Configuration

Basic Configuration in the mkdocs.yml file:

plugins:
  - mkdocs_exclude_tagged_files:
      tags_to_exclude: ["confidential", "excluded"]

This configuration will exclude all files that have one of the tags "confidential" or "excluded" in their frontmatter.
For example this file will be excluded:

---
tags: ["confidential", "someothertag"]
---
# Content

By default, the plugin strips leading #-symbols from tags, so the tag #excluded will be treated the same as excluded.
If you want to disable this behavior set the config value strip_leading_hashtags to false.

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-exclude-tagged-files-1.0.4.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

Supported by

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