A mkdocs plugin that lets you conditionally include files or trees.
Project description
File exclude plugin for mkdocs
mkdocs-exclude is a mkdocs plugin that allows you
to conditionally include files from your input using regular expressions (regexes).
This will only include the following files in your mkdocs:
- file location does not have the specified prefix
- file is in the specified prefix, and matches any of the specified regexes
The big advantage of this is, that you can include your closed-source repositories into a mkdocs monorepo, and explicitly ONLY include your documentation sub-folders in the mkdocs artifacts.
Quick start
- Install the module using pip:
pip3 install mkdocs-conditional-include - In your project, add a plugin configuration to
mkdocs.yml:
plugins:
- conditional_include:
rules:
- prefix: my-docs
regex:
- '.*\/docs\/.*'
- '.*\/docs-assets\/.*'
- prefix: my-docs-2
regex:
- '.*\/docs\/.*'
Not specifying any prefix will run the particular rule over all files, thus filtering everything.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mkdocs-conditional-include-0.0.1.tar.gz.
File metadata
- Download URL: mkdocs-conditional-include-0.0.1.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
162b1c87b9cde91859c3ff3a4ac5f1256f2ff59b642a691d782ce7689dc0bc23
|
|
| MD5 |
4218ef5b1fb93b6e091b29f34e625675
|
|
| BLAKE2b-256 |
6aaa221bac485dc8d0fbd4c34b1de92e1df9986cd8d858bce66128a446dd5e5a
|
File details
Details for the file mkdocs_conditional_include-0.0.1-py3-none-any.whl.
File metadata
- Download URL: mkdocs_conditional_include-0.0.1-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c381af9b0e84d6b5f0508b7b686693c60205be0411d2a2dac4634c9a7e05451e
|
|
| MD5 |
461b41d3470e4b6050bd630576edc0c0
|
|
| BLAKE2b-256 |
5421565e877dee8de518ced39f3e35447b075292ebb2bd4a8998ae88d9beb1f3
|