Skip to content

effigies/mkdocs-branchcustomization-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

aac2291 · Apr 17, 2022

History

8 Commits
Dec 13, 2019
Dec 13, 2019
Dec 13, 2019
Apr 17, 2022
Dec 13, 2019
Dec 13, 2019
Dec 13, 2019
Dec 13, 2019
Dec 13, 2019

Repository files navigation

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.

About

Customize MkDocs options on a per-branch basis

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages