Configuring the Tool#

Note

To prevent accidental commits of sensitive information, all configuration files matching the env.*.toml pattern in the root directory are ignored by git. However, this rule does not apply to files within the etc/ directory.

Use separate TOML files to define the configuration for each of your environments. To avoid confusion, name each file according to its specific purpose. For instance, use env.devel.toml for development, env.staging.toml for staging, and env.production.toml for production.

An example configuration file is provided in the repository at etc/docbuild/env.example.toml.

To use your configuration file, follow these steps one time:

  1. In your cloned GitHub repository, copy the example file etc/docbuild/env.example.toml to the root directory of this project. For example:

    cp etc/docbuild/env.example.toml env.devel.toml
    
  2. Open your TOML file.

  3. Adjust the path paths.root_config_dir. Use the path from Getting the XML configuration. The rest can stay as it is.

  4. Specific the configuration with the global option --env-config.

To deal with different environments without having to type the full command each time, create aliases in your shell. This allows you to quickly switch between configurations without needing to remember the exact command syntax.

Example aliases for different configuration files#
alias docbuild-prod='docbuild --env-config env.production.toml'
alias docbuild-test='docbuild --env-config env.testing.toml'
alias docbuild-dev='docbuild --env-config env.devel.toml'