How to change the default theme for generateSite
The goal of docToolchain is to provide an environment where you can focus on documentation, not worry about theming. That’s why both the GSP templates and CSS are bundled with docToolchain.
How theming works
docToolchain builds the result theme from three locations (in order of priority):
-
Internal theme: Copied into the build output path (
build/microsite/tmp/site). -
External theme: If the
DTC_SITETHEMEenvironment variable is set, it overrides the default theme at the file level. -
Project theme: Your local
src/sitedirectory — any files here override the defaults.
Customizing the theme
To customize the theme, create your own files in src/site/ in your project.
The internal theme files are in the docToolchain repository under src/site/.
A theme follows this structure: templates/ (the GSP templates), doc/ (the landing page and any static content), and assets/ (CSS, JS, images copied verbatim into the site). The ~~-delimited jbake.properties in the theme root configures template-to-type mappings and Markdown extensions.
The template uses Bootstrap 5 as its CSS framework.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.