Skip to main content

Simple plugin to exclude notused .md files from docs folder

Project description

License: MIT Build & Test PyPI - Version

mkdocs-exclude-unused

A simple MkDocs plugin that automatically removes all .md files not included in the nav section of your mkdocs.yaml file.

How to use

Simply add plugin to your mkdocs .yml file

plugins:
  - mkdocs-exclude-unused

Example

In your mkdocs.yaml your nav section looks like this:

nav:
  - Main: index.md
  - Page1: Page1.md

But in your docs folder you have:

docs/
    index.md
    Page1.md
    Page2.md

Mkdocs will create .html file for each of .md file even if it's not mentioned in 'nav' section!

Page2.md can be used in other mkdocs.yml files, or it may be required in the docs folder for other reasons. After running mkdocs build or mkdocs serve, warnings will be generated if Page2.md is missing from the navigation, preventing you from building in --strict mode. This plugin solves the problem by removing unused pages.

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_unused-1.0.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

mkdocs_exclude_unused-1.0.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_exclude_unused-1.0.1.tar.gz.

File metadata

  • Download URL: mkdocs_exclude_unused-1.0.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for mkdocs_exclude_unused-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5a750244f92e9a44d1d1c45c2f61174eb923eca6ce19fde125d96db5aa94aa2c
MD5 b40b19696d023101777b2878d1e0625f
BLAKE2b-256 1679207226cfd229a017326dccbb60e2337d21ec5c337e452b7cf0619c3cfea1

See more details on using hashes here.

File details

Details for the file mkdocs_exclude_unused-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_exclude_unused-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6b84708c0b8ef70d48b6cf358f542fa20899c7bf6439c7dca3ac7ede211d4d6e
MD5 2da9b47db07cb094129419bc0c109774
BLAKE2b-256 4d50a7d431a2fe43ef7af2e90b77a38837b9050d9ea4eba9954f05b3fce62b08

See more details on using hashes here.

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