A dark template for documentation generated with DocFX.
The theme is created as an override of the default template, so both default
and darkerfx
needs to be enabled in docfx.json
Here is an example of what it looks like:
You can view a demo DocFX project with this template HERE.
- Download the source or the zipped file from the releases.
- Create a
templates
folder in the root of your DocFX directory. - Copy the
darkerfx
folder to thetemplates
folder. - Update the
docfx.json
configuration to include thedarkerfx
template:{ "template": [ "default", "templates/darkerfx" ], }
The theme is based on the great darkfx theme by Steffen Wilke. Many thanks to you!
The main changes in this theme compared to darkfx are as follows:
-
The light theme follows more closely the default docfx theme. For example, we specifically avoid overwriting non-color-related CSS attributes. The idea is to make this theme "lean and mean", and avoid messing with upstream styles when not absolutely necessary.
-
The light theme does not use a liquid container, but instead follows the same limited-width as the default docfx theme.
-
The dark theme has different colors, more resembling https://docs.microsoft.com.
-
The hljs (highlightjs) colors for both the dark theme and the light theme was adjusted to use the following hljs styles:
-
The CSS variables were renamed to
--theme-*
, again similar to howdocs.microsoft.com
has done it. -
The CSS stylesheet was converted to SASS, which simplifies some things greatly.
darkFX in turn has the following acknowledgement: Many thanks to Oscar Vásquez from which I borrowed the example pages and repository structure of his Material Theme for DocFX.