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):

  1. Internal theme: Copied into the build output path (build/microsite/tmp/site).

  2. External theme: If the DTC_SITETHEME environment variable is set, it overrides the default theme at the file level.

  3. Project theme: Your local src/site directory — 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.