A mkdocs plugin that lets you include subfolder of a top level tree.
Project description
Folder include plugin for mkdocs
mkdocs-include-folders
is a
mkdocs plugin that allows you
to include and prioritize folders from your input.
Quick start
-
Install the module using pip:
pip3 install mkdocs-include-folders
-
If your document folders look like this:
documents
project1
mkdocs.yml
specifications.md
project2
mkdocs.yml
specfications.md
shared-docs
introduction.md
contact.md
.....
you may want to create a document including pages from the project1
and shared-docs
and present them in the same folder, this plugin will take documents from project1
and shared-docs
and place the im the same folder and also proritize files in project1
over files in shered-docs
if they have the same name.
- In your project, add a plugin configuration to
mkdocs.yml
:docs_dir: .. plugins: - include-folders
ordocs_dir: .. plugins: - include-folders: priority_path: - 'project1/*' - 'shared-docs/*'
You can provide one or more patterns. (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
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
Hashes for mkdocs-include-folders-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e93e6aca632cd85f114999b6afba455a52d797b6ab8c9ea01bfe798f53735465 |
|
MD5 | a4a7562aefc951b44de8c5939dcada7b |
|
BLAKE2b-256 | e3da642a3c671be195373bfa9f4cb0f5e015521ad95007e9b933e0368ef3a3f5 |
Hashes for mkdocs_include_folders-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64a9f75877cff8f75742c8c4b75b054b9914de48c633c3423c93f7093e48df10 |
|
MD5 | 6a0672196704f196cc3e94d200c59581 |
|
BLAKE2b-256 | b0557b0b09cd477141722ef6e6cb2c1c5ea6dc237558f81ddbd7852ab4cbf0d1 |