1. Export template:
    • Run docfx template export default, then you'll see default template in _exported_templates\default
  2. Change themes in default template, e.g:
    • Adding external resource: modify styles\head.tmpl.partial
    • CSS change: modify styles\docfx.css or styles\main.css
  3. Use customized template:
    • Run docfx -t _exported_templates\default, which will use your customized template!

NOTE: It is possible that DocFX updates its embedded templates when releasing new version. So please make sure to re-export the template if you overwrite or dependent on that template in your custom template.

Answer from Yuby on Stack Overflow
🌐
.NEXT
dotnet.github.io › docfx › docs › template.html
Template | docfx
Docfx ships several built-in templates. We recommend using the modern template that matches the look and feel of this site.
🌐
GitHub
github.com › ovasquez › docfx-material
GitHub - ovasquez/docfx-material: A simple material theme for DocFX · GitHub
A simple material theme for DocFX. This is an override of the modern template so you need to enable both in the docfx.json.
Author: ovasquez
🌐
GitHub
github.com › fszlin › docstrap
GitHub - fszlin/docstrap: DocFX theme with boostrap 4 · GitHub
June 27, 2018 - DocFX template based on the default template, with Boostrap 4.
Author: fszlin
🌐
GitHub
github.com › lijunle › docfx-theme
GitHub - lijunle/docfx-theme: Theme collection for DocFX. · GitHub
Theme collection for DocFX. Contribute to lijunle/docfx-theme development by creating an account on GitHub.
Author: lijunle
🌐
GitHub
github.com › dotmake-build › docfx-plus
GitHub - dotmake-build/docfx-plus: A template and a tool for enhancing DocFx. · GitHub
Cross domain errors with file:// origin is fixed with some smart tricks so TOC, Nav, Breadcrumb and even the full-text search works. We didn't implement a new separate theme but instead added this switch for existing docfx-plus theme so that the offline version looks and works exactly like online version.
Author: dotmake-build
🌐
2sxc
docs.2sxc.org › abyss › contribute › docs › implementation › docfx-templates.html
Implementation: DocFx Templates | 2sxc 22 for Dnn and Oqtane
The default and modern templates are provided by DocFX, while the 2sxc template is custom-made for 2sxc.
🌐
GitHub
github.com › Singulink › SingulinkFX
GitHub - Singulink/SingulinkFX: DocFX template used by Singulink projects. Fully responsive and designed to be familiar to those used to browsing Microsoft .NET documentation. · GitHub
The styles/main.js file can be used to add your own custom Javascript. The recommended approach is to create another directory inside templates for your sub-theme, add a styles/main.js file, and add your theme to the end of the list of templates in docfx.json.
Starred by 38 users
Forked by 8 users
Languages: CSS 61.6% | JavaScript 38.4%
Find elsewhere
🌐
Ovasquez
ovasquez.github.io › docfx-material
DocFX Material | 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.
Starred by 55 users
Forked by 9 users
Languages: CSS 88.7% | JavaScript 11.3% | CSS 88.7% | JavaScript 11.3%
🌐
NuGet
nuget.org › packages › docfx-plus
NuGet Gallery | docfx-plus 3.6.0
A dotnet tool for enhancing docfx behaviour and template/theme.
🌐
.NEXT
dotnet.github.io › docfx › tutorial › walkthrough › advanced_walkthrough.html
🔧 Walkthrough Advanced: Customize Your Website | DocFX website
Create a new folder at your DocFX project root to hold your custom templates. Give it a meaningful name, such as templates. Inside of that folder, create a new folder named for your custom template.
🌐
Vicancy
vicancy.github.io › docfx › tutorial › docfx.exe_user_manual.html
docfx.exe User Manual
Please avoid using these as template folder name. To custom theme, one way is to specify theme name with --theme command option, multiple themes must be separated by , with no spaces. The other way is to set key-value mapping in docfx.json as similar to defining template.
🌐
.NEXT
dotnet.github.io › docfx › tutorial › howto_create_custom_template.html
Create a Custom Template | docfx - NET - GitHub Pages
For example, you can merge default template and your custom template by calling docfx build docfx.json -t default,c:/docfx_howto/simple_template. Multiple templates are split by a comma , in the command line.
🌐
SourceForge
sourceforge.net › projects › docfx.mirror
DocFX download | SourceForge.net
February 24, 2026 - DocFX can produce documentation ... to any host such as GitHub Pages or Azure Websites with no additional configuration. DocFX provides a flexible way to customize templates and themes....
🌐
GitHub
github.com › dotnet › docfx › issues › 1255
Custom theme · Issue #1255 · dotnet/docfx
January 30, 2017 - Title Customizing theme using 'theme' property doesn't work I've tried following documentation of how to change theme using 'theme' property for build, but it doesn't work. I always get: [Apply Theme.ExportResourceFiles]Unable to find ma...
Author: dotnet
🌐
Daniel Cazzulino
cazzulino.com › customize-docfx.html
How to customize and publish a docfx site
September 9, 2020 - The docfx templating system allows applying more than one template when building the site, and every template can override what’s included in the previous one by just providing files with the same name and path.
🌐
GitHub
github.com › dotnet › docfx › discussions › 9509
Problems Trying To Use The Modern Theme · dotnet/docfx · Discussion #9509
From the list shown, the Modern theme is included as an embedded theme, so I downloaded the DocFX repo and copied the data in the templates/modern folder into a templates folder I created on my system.
Author: dotnet
🌐
Medium
medium.com › hitachisolutions-braintrust › getting-started-with-docfx-c710dad2e8c9
Getting Started With DocFX | Hitachi Solutions Braintrust
December 13, 2021 - DocFX comes with some pre-defined templates for you to choose from. You can visit the DocFX Templates Page to review each one as well as locate the command needed in the DocFX json file. For example, if you wanted to use the darkFX theme you would first need to download the theme.