Skip to main content

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

mkdocs-branchcustomization-plugin-0.1.3.tar.gz (19.0 kB view details)

Uploaded Source

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

Hashes for mkdocs-branchcustomization-plugin-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c34b891a6ab1d8a19c81ac5e2fa1ea435bc17155e4dd733627bc7db98d933870
MD5 3ffe0dcc0a05ecb11e4958e49b238d3b
BLAKE2b-256 c1d52823c9e878152e5291d7c368c0f30b2df523b4220477eae0d0dc53c859e0

See more details on using hashes here.

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

Hashes for mkdocs_branchcustomization_plugin-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b29ebe625b32be042f1ede935490134afac55962458be09bd2bcd746aa54fedf
MD5 2e7735d506eb870f84cb4c11041b3314
BLAKE2b-256 3f2da3aca81a7a7f23cf8ae3047a274e4f5ff6fd651b10551a098bf2815ff48c

See more details on using hashes here.

Supported by

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