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/
          extra_css: css/master_branch.css

Note that this will override the global extra_css value.

To customize every branch except master:

  - branchcustomization:
        - branch: /(?!^master$)/
          extra_css: css/draft.css
          extra_js: js/draft.js

This is just to demonstrate that multiple configuration options can be overridden.

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.1.tar.gz (18.8 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page