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:

  - branchcustomization:
        - branch: /master/
            - css/master_branch.css

Note that this will override the global extra_css value.

To customize every branch except master:

  - branchcustomization:
        - branch: /(?!^master$)/
            - css/draft.css
            - 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 hashes)

Uploaded Source

Built Distribution

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