Timo Abele Ralf D. Müller stehlih Dr. Stefan Pfeiffer Alexander Schwartz

2 minutes to read

This appendix covers all configuration introduced by docToolchain. AsciiDoc, AsciiDoctor, Gradle and other tools and libraries used know of more configuration settings and you can read about those in the corresponding documentation.

mainConfigFile and docDir

docToolchain should be easy to use. That’s why the goal is to have one config file with all settings for each project. But first of all, docToolchain has to know where your documentation project is located.

If docDir is defined, the default for mainConfigFile is Config.groovy in the root folder of your docDir.

You have several options to specify the location of your documentation project (docDir) and the location of your config file (mainConfigFile).


Specify the property on the commandline

./dtcw generateHTML -PmainConfigFile=Config.groovy
you can verify the location of your Config.groovy by executing docToolchain with the --info parameter which sets the loglevel to info. It will print the location on the command line (among other settings)

dynamic configuration properties

Sometimes you need a more dynamic configuration. Since the configuration file is an executable .groovy file, you can not only configure static values but also fetch dynamic once.

For example,

   example =

You can then specify the property with the -D parameter like this

./dtcw docker generateHTML -DmyProperty=myValue

In the same way, you can use environment variables

   example = System.getenv("myEnvVariable")

But in this case, you have to ensure that the environment variable can be accessed. It will not work for docker based execution of dtcw

Content of the mainConfigFile

Unresolved directive in <stdin> - include::../../../Config.groovy[tags=**]

AsciiDoc config

Command Line Parameters