# From the workspace root (parent of docToolchain/)
./start-devcontainer.sh
Setting Up a Dev Environment
Before You Begin
When you install docToolchain, all the code is hidden in ~/.doctoolchain/.
This page explains how to set up a development environment to modify and test docToolchain itself.
Using the Devcontainer
The easiest way to develop docToolchain is using the multi-repo devcontainer from the workspace root (not this repo):
This provides Java 17, Go, Python, and all necessary tools.
Local Development Setup
-
Fork https://github.com/docToolchain/docToolchain on GitHub.
-
Clone your fork:
git clone --branch main-4.x git@github.com:<your-user>/docToolchain.git cd docToolchain -
Build the runtime JARs:
./gradlew packageLibsThis creates
build/lib/*.jar— the v4 runtime classpath. Copy them tolib/for the wrapper to detect v4:cp -r build/lib lib -
Run tasks directly:
CLASSPATH=$(find lib/ -name '*.jar' | tr '\n' ':') \ java -DdocDir=. -DmainConfigFile=Config.groovy \ groovy.ui.GroovyMain scripts/generateHTML.groovy
Create or Change a Theme
How to Overwrite a Project Theme
When docToolchain builds a static website, it copies themes in this order:
-
Internal theme →
build/microsite/tmp/site -
External theme (if
DTC_SITETHEMEis set) -
Project theme from
src/site/
To customize, place your modified files in src/site/ in your project.
How to Create a Theme from Scratch
A theme is the contents of the src/site/ directory.
See the jBake documentation for the expected structure.
Special Functionality for Themes (Config Fragments)
Create a configFragment.groovy in the site folder of your theme to prompt users for config values during theme installation:
// the title of the microsite, displayed in the upper-left corner
// Example: my new site
title = '##site-title##'
Values surrounded by ## will prompt the user during installation.
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.