Configuration

docToolchain uses a single Groovy configuration file for all settings.

Configuration File

By default, docToolchain looks for docToolchainConfig.groovy in your project root.

Overriding the Config File

Use the DTC_CONFIG_FILE environment variable:

export DTC_CONFIG_FILE=path/to/config.groovy
Important
The config file must exist before running any task. If it is missing, DtcConfig.load() will fail. Run ./dtcw4 local downloadTemplate to create a default one, or create an empty docToolchainConfig.groovy manually.

Core Settings

outputPath = 'build'
inputPath = 'src/docs'

inputFiles = [
    [file: 'manual.adoc', formats: ['html','pdf']],
]

imageDirs = ['images/.']
outputPath

Base directory for all generated output.

inputPath

Directory containing your AsciiDoc sources.

inputFiles

List of files to process, with desired output formats (html, pdf).

imageDirs

Directories to scan for images (relative to inputPath).

Microsite Settings

microsite.with {
    contextPath = '/'
    title = 'My Documentation'
    host = 'https://example.com'
    landingPage = 'landingpage.gsp'
    menu = [
        about: 'About',
        manual: 'User Docs',
        tasks: 'Tasks',
    ]
}
menu

Maps menu codes (from folder names or :jbake-menu: attributes) to display titles. Use '-' to hide a menu entry.

Confluence Settings

confluence = [
    api: 'https://your-wiki.atlassian.net/wiki',
    spaceKey: 'MY_SPACE',
    credentials: "user:${new File('/path/to/apitoken').text}",
    input: [
        [file: 'build/html5/manual.html', ancestorId: '123456'],
    ],
]

See the publishToConfluence task for all options.

Dynamic Configuration

Since the config file is executable Groovy, you can use dynamic values:

// From system property: ./dtcw4 local generateHTML -DmyProp=value
example = System.properties.myProp

// From environment variable
example = System.getenv("MY_VAR")