Bifrost MkDocs¶
An MkDocs Material plugin that applies Intility's Bifrost design system.
See the Feature Showcase for a live demonstration of every enabled extension and component.
Quick Start¶
- Create a new repo from the bifrost-mkdocs-template, or add the plugin to an existing project
-
Install the plugin and add it to your
mkdocs.yml. This is the complete minimum: -
Start writing docs. The plugin configures the markdown extensions, theme features, fonts, and icons for you.
That's all you need. Everything else (markdown extensions, theme features, fonts, icons, and a teal light/dark palette toggle) is injected automatically and can be overridden by setting it yourself. To use a different color, set your own palette.
Overriding Defaults¶
The plugin never overwrites your config. To customize any default, just set it explicitly in your mkdocs.yml. For example, to disable the permalink on headings:
Customization¶
Change the Color Scheme¶
The plugin injects a teal light/dark palette by default. To use a different color, set your own palette (this also lets you customize the toggle icons and labels):
theme:
name: material
palette:
- scheme: light
primary: &bifrost_theme teal # Options: teal, purple, pink, yellow
toggle:
icon: material/brightness-7
name: Switch to dark mode
- scheme: dark
primary: *bifrost_theme
toggle:
icon: material/brightness-4
name: Switch to light mode
The &bifrost_theme anchor defines the color once and reuses it for both modes. A user-defined palette replaces the injected default entirely, so include both modes if you want to keep the toggle.
Version Badge¶
Display a version badge in the header next to the site name by setting extra.version:
The badge renders using Bifrost's bf-badge styling and only appears when version is set.
Add Pages¶
The bundled awesome-nav plugin builds the navigation from .nav.yml files placed next to your content, so there's no central nav: block to maintain. Enable it once in mkdocs.yml:
Then create markdown files in docs/ and drop a .nav.yml alongside them to set the order and titles:
A .nav.yml inside a subdirectory (for example docs/guide/.nav.yml) orders that section. Without awesome-nav, list pages in a standard MkDocs nav: block instead.
Show Page Dates¶
The bundled git-revision-date-localized plugin adds "last updated" (and optionally creation) dates to pages from your git history. It's installed alongside the theme; opt in by adding it to your plugins: list:
plugins:
- intility-bifrost
- search
- git-revision-date-localized:
enable_creation_date: true
type: timeago