Skip to main content

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

  1. Install the module using pip: pip3 install mkdocs-include-folders

  2. 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.

  1. In your project, add a plugin configuration to mkdocs.yml:
    docs_dir: ..
    plugins:
       - include-folders
    
    or
    docs_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocs-include-folders-0.1.4.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_include_folders-0.1.4-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs-include-folders-0.1.4.tar.gz.

File metadata

  • Download URL: mkdocs-include-folders-0.1.4.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for mkdocs-include-folders-0.1.4.tar.gz
Algorithm Hash digest
SHA256 1896e8ca9e32dfd12810063607cf1dc04297f25be3ad2f56811da27acff7636d
MD5 be62a0e977aa892a04375e183ba03601
BLAKE2b-256 a05929fe231eece0eb86f4cea5682f483437cd8676f43a3e0933bb5bc64ce365

See more details on using hashes here.

File details

Details for the file mkdocs_include_folders-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_include_folders-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6d9c970eab53fc114466e23da0c8167d92dfd2d19e5b92eeee3fb0d00a1cdf2d
MD5 84ecc69c6824f7f5d2a8e4628f241034
BLAKE2b-256 56836c7e4cfbdb0156f9d31f84547e4fb0846b79b57f8b5bff62b7b8cef836ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page