Update mkdocs configuration based on the git branch
Project description
MkDocs Branch Customization Plugin
This plugin allows configuration options to be overridden on a per-branch basis. Branches are matched with regular expressions.
An example for adding CSS to the master
branch might be:
plugins:
- branchcustomization:
update_config:
- branch: /master/
extra_css:
- css/master_branch.css
Note that this will override the global extra_css
value.
To customize every branch except master
:
plugins:
- branchcustomization:
update_config:
- branch: /(?!^master$)/
+extra_css:
- css/draft.css
extra_js:
- js/draft.js
In this case the +extra_css
indicates that this list should be appended to
the global extra_css
value, rather than overriding it, while extra_js
overrides
the global value.
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
File details
Details for the file mkdocs-branchcustomization-plugin-0.1.3.tar.gz
.
File metadata
- Download URL: mkdocs-branchcustomization-plugin-0.1.3.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191201 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c34b891a6ab1d8a19c81ac5e2fa1ea435bc17155e4dd733627bc7db98d933870 |
|
MD5 | 3ffe0dcc0a05ecb11e4958e49b238d3b |
|
BLAKE2b-256 | c1d52823c9e878152e5291d7c368c0f30b2df523b4220477eae0d0dc53c859e0 |
File details
Details for the file mkdocs_branchcustomization_plugin-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: mkdocs_branchcustomization_plugin-0.1.3-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191201 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b29ebe625b32be042f1ede935490134afac55962458be09bd2bcd746aa54fedf |
|
MD5 | 2e7735d506eb870f84cb4c11041b3314 |
|
BLAKE2b-256 | 3f2da3aca81a7a7f23cf8ae3047a274e4f5ff6fd651b10551a098bf2815ff48c |