Table of Contents

DocFX Material

A simple material theme for DocFX. This is an override of the modern template so you need to enable both in the docfx.json. The design was inspired by

If you are looking for the previous version of docfx-material that doesn't use the modern template you can still get it as material-classic.

DocFX Material Site


  1. Download the source or the zipped file from the releases.
  2. Create a templates folder in the root of your DocFX directory.
  3. Copy the material folder to the templates folder.
  4. Update the docfx.json configuration to include the material template:
    "template": [

Color customization

DocFX's modern template is based on Bootstrap 5 (version 5.3 at the time of writing) so you can use Bootstrap's CSS variables to customize a lot of the colors.

Here are some of the most common customizations that can be made in the template's CSS file material/public/main.css, like updating the header color, changing the font,

/* Changing the navbar color only for the light theme */
[data-bs-theme='light'] nav.navbar {
  background-color: var(--bs-primary-bg-subtle);

/* Change active navlink color */
.navbar-nav {
  color: var(--bs-link-hover-color);

/* Changing the site font */
@import url(';400;700&display=swap');

:root {
  --bs-font-sans-serif: 'Roboto';

Markdown extras

For more reference about markdown support in DocFX check the official documentation.


This is a note which needs your attention, but it's not super important.


This is a warning containing some important message.


This is a warning containing some very important message.

DocFX tips

To enable search in DocFX it's not enough to set the configuration parameter to true:

"globalMetadata": {
    "_enableSearch": "true"

You also have to indicate in the docfx.json the post processor that generates the index for the searches:

"postProcessors": ["ExtractSearchIndex"],