Configuration Reference
Golem configuration can be defined either in a dedicated golem.toml file in the project root or embedded within pyproject.toml under [tool.golem.*].
Configuration Precedence
When resolving settings, Golem merges configurations in the following order (highest precedence first):
- CLI Flag Arguments (e.g.
--output-dir dist/,--strict) golem.tomlfile in working directorypyproject.toml([tool.golem.*]tables)- Internal Package Defaults
golem.toml Schema
TOML
[site]
title = "Golem Documentation"
author = "Michael Bernstein"
site_url = "https://webmaven.github.io/golem/"
[build]
content_dir = "content"
output_dir = "dist"
theme = "default"
static_dir = "static"
templates_dir = "templates"
plugins_dir = "plugins"
strict = false
quiet = false
[navigation]
# Optional explicit sidebar ordering (defaults to automatic directory discovery)
nav = [
"index.adoc",
"getting-started/installation.adoc",
"getting-started/quickstart.adoc",
]
[plugins]
# List of installed Pluggy plugin package entry-points or local modules
plugins = [
"golem.plugins.doctest",
"golem.plugins.apidoc",
]
[api]
# Packages to scan for API reference documentation generation
packages = ["golem"]
output_dir = "api"
docstring_style = "auto" # Options: "auto", "google", "numpy", "sphinx", "asciidoc"
Embedding in pyproject.toml
For Python package repositories documenting their library within docs/:
TOML
[tool.golem.site]
title = "My Library Documentation"
author = "Your Name"
[tool.golem.build]
content_dir = "docs"
output_dir = "dist"
theme = "default"
[tool.golem.plugins]
plugins = [
"golem.plugins.doctest",
"golem.plugins.apidoc",
]
[tool.golem.api]
packages = ["my_package"]
output_dir = "api"
docstring_style = "auto"