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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 155b9e2f0a8d7b0a6b4e6e6748fb56e7a386e75abbdc381b76767c5ce84989fb |
|
MD5 | 24dcf52eec7b9b084025cbd72a558537 |
|
BLAKE2b-256 | 339b26db64e036d170e52fac39aa01fb5318a29123c7086255b51aa04dcdcef0 |
Hashes for mkdocs_include_folders-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37b50a254f7ec90bb9e80a5447f123789d128b0740c16c7a976f718a9a86c2d1 |
|
MD5 | 2fd46657bd5aff470414f845bd4e6bcb |
|
BLAKE2b-256 | 28f107db93bc0b508919e8405de202a72c7e6dda998bcf537105aa42df6fce32 |