A MkDocs theme, derived from the MkDocs Bootswatch spacelab theme, which in turn is based on Bootstrap. The theme is targeted for use in general websites, other than specialised documentation sites. For this goal a couple of extra configuration options are made available, specific for the handling of the sidebar usage (TOC block).
To use this theme with your MkDocs project, download/clone in a subdirectory
mkdocs-mo6 and add the following to your
The following changes / additions are made compared to spacelab:
- The sidebar (TOC) is moved to the right
- The TOC is not shown on small screens (<= 995px)
- Padding has been added to the bottom of the page
- Page titles are displayed more prominently
- The theme respects the
include_next_prev: Falsesetting in mkdocs.yml
- The 'Documentation built with MkDocs.' footer message has been removed by default, but can be enabled by the
mkdocs_footersetting (see below).
- Additional configuration options are added
Extra mkdocs.yml configuration options
The following configuration options are available for the
min_toc_links: <num>defines the minimum TOC links needed for the TOC to be displayed. With this option small pages with a few sections don't show a TOC.
mkdocs_footer: <boolean>switches the display of the standard MkDocs footer.
build_date_footer: <boolean>switches the display of the date of the last build.
A example use of the options for
extra: min_toc_links: 2 mkdocs_footer: true build_date_footer: true
Extra page specific meta options
The following meta configurations are available, used to configure individual pages:
notoc: if set it will disable the display of the TOC
fullwidth: if set the page content will fill the whole width of the browser (grid) view
showsitemap: if set it will include a sitemap below the content on the page
An example of the use of the meta options in a specific page is:
notoc: true fullwidth: true showsitemap: true <div class="jumbotron"><div class="container"> <h1>Hello, world!</h1> <p>...</p> <p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a></p> </div></div> # Hello world An paragraph of example text.
Code released under the MIT License.