A mkdocs plugin that lets you exclude files or trees and removes navigation entries.
Project description
File exclude plugin for mkdocs
Extension of mkdocs-exclude plugin to also provide navigation filtering.
mkdocs-excluder-plugin
is a
mkdocs plugin that allows you
to exclude files from your input using unix-style wildcards (globs) or
regular expressions (regexes).
This implements what people were asking for in some mkdocs bugs, such as https://github.com/mkdocs/mkdocs/issues/1500 and https://github.com/mkdocs/mkdocs/issues/1152.
Quick start
-
Install the module using pip:
pip install mkdocs-excluder-plugin
-
In your project, add a plugin configuration to
mkdocs.yml
:plugins: - excluder: glob: - exclude/this/path/* - "*.tmp" - "*.pdf" - "*.gz" regex: - '.*\.(tmp|bin|tar)$'
You can provide zero or more patterns of each type. (If you don't provide any patterns, then nothing will happen!)
Note! Because of peculiarity of yaml syntax, the glob:
and regex:
lines
must not start with a dash, but the lines under them must start with
a dash.
Also because of yaml, patterns that start with a punctuation mark must be quoted.
When writing regexes, it's best to use single quotes rather than double quotes, so that your regex backslash escapes are preserved correctly without having to be doubled up.
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
Built Distribution
Hashes for mkdocs-excluder-plugin-0.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a48a8ef2eb7281a4edf6053e85921e733c973ca47dae6ccbdd74508edc15d8b5 |
|
MD5 | 87797f7e3c7de80e678d030b9451f32e |
|
BLAKE2b-256 | 410d1be506465d06e2aa6304cacf98c02bb302ee0b91ec0bcb243a505cb3eded |
Hashes for mkdocs_excluder_plugin-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c100afd20d758dcab90b0b91d9bd3325ad58e043535ec269a826cf09ec839397 |
|
MD5 | 2623be6e8ce7373a3f68279cf3da4440 |
|
BLAKE2b-256 | b793f4e200f67eb9568879286cbcf73ad55cce77e1e579e385f0e86ab7b3aa81 |