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.

Files for mkdocs-branchcustomization-plugin, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size mkdocs_branchcustomization_plugin-0.1.3-py3-none-any.whl (4.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size mkdocs-branchcustomization-plugin-0.1.3.tar.gz (19.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page