The configuration file is a TOML file named cppdoc.toml with the following sections:
name: Project name.version: Project version.
glob: Glob to use for finding documented files.compiler_arguments: List of arguments to pass to libclang while parsing code.
static_dir: Path to a directory containing static files that will be copied in the output directory, this is wherestyle.csswill typically be located.path: Path to the output directory.root_namespace(optional): Namespace to use as the root, this is useful for libraries that only globally expose one namespace and want the index to be based on that namespace.base_url: Base URL to prepend all paths with.enable_mermaid: Whether to enable mermaid, default:truebundle_mermaid: Whether to bundle mermaid (mermaid.mjsin the static directory), otherwise it is fetched from a release online, default:falsebundle_minisearch: Whether to bundle minisearch (minisearch.jsin the static directory), otherwise it is fetched from a release online, defaultfalsetheme(optional): Syntax highlighting theme to use, this must be part of the theme set specified bytheme_set_fileor the default theme settheme_file(optional): Path to a sublime text .tmTheme syntax highlighting theme to usetheme_set_file(optional): Path to a compressed .themedumpsyntecttheme set file
index(optional): Markdown file to use as the index file, if an index page is not specified, the root namespace's comment will be used instead.book(optional): Path to directory containing anmdbook-typeSUMMARY.mdfile, listing all pages
enable: Whether to enable documentation tests or not.run: Whether to run documentation tests or not (if disabled, tests will only be compiled).compiler_invocation: Compiler invocation to use to compile documentation tests, this is represented as an array containingargv. The sentinel values{file}and{out}are replaced at runtime by the appropriate values.
[project]
name = "Example"
version = "0.1.0"
[input]
glob = "include/**/*.hpp"
compiler_arguments = ["-Iinclude", "-std=gnu++20", "-xc++"]
[pages]
index = "README.md"
book = "extra-pages"
[output]
static_dir = "static"
path = "docs"
base_url = "/cppdoc"
theme = "ayu-dark"
[doctests]
enable = false
run = true
compiler_invocation = ["clang++", "{file}", "-o", "{out}", "-Iinclude", "-std=c++20"]