documenteer.toml reference#

Rubin’s Sphinx user guide configuration with uses a documenteer.toml file, located next to the Sphinx file to configure metadata about the project. This page describes the schema for this documenteer.toml file. For a step-by-step guide, see Setting up the Documenteer configuration for Rubin user guides.

[project] table#

The [project] table is where most of the project’s metadata is set.




Name of the project, used as titles throughout the documentation site. The title can be different from the package name, if that’s the local standard.

title = "Documenteer"


Optional Auto set by project.python

The root URL of the documentation project, used to set the canonical URL link rel, which is valuable for search engines.

base_url = ""


Optional Auto set by project.python

The URL for the project’s GitHub source repository. When set, a link to the repository is included in the site’s header.

github_url = ""



The default branch on GitHub. Default is main. Used in conjunction with the “Edit on GitHub” link, see sphinx.show_github_edit_link.


Optional Auto set by project.python

The project’s version, which is set to the standard Sphinx version and release configuration variables.



Projects that use a pyproject.toml to set their build metadata can include a [project.python] table in documenteer.toml. With this, many metadata values are automatically detected — look for Auto set by project.python badges above.


If a value is directly set, such as version, that value will override will override information discovered from the Python project itself.



This is the Python project’s name, as set in the name field of the [project] table in pyproject.toml. Note that the package name can be different from the Python module name. Setting this field actives automatic metadata discovery for Python projects.


package = "documenteer"



By default the base_url is detected from the Homepage field in the [project.urls] table of pyproject.toml. If your documentation’s URL is associated with a different field label, set that with documentation_url_key.



By default the github_url is detected from the Source field in the [project.urls] table of pyproject.toml. If your GitHub repository’s URL is associated with a different field label, set that with github_url_key.



This [sphinx] table allows you to set a number of Sphinx configurations that you would normally set through the file.



On some pages the default sidebar (on the left) is inappropriate, such as index pages that already contain a table of contents as their main content. In that case, you can set individual pages or globs (without extensions) of pages that are shown without the primary sidebar. The default is ["index"] to remove the sidebar from the homepage.

disable_primary_sidebars = [


This configuration is for the primary sidebar, on the left side, containing side or section-level navigation links. To remove the page-level contents sidebar, on the right side, add :html_theme.sidebar_secondary.remove: to the page’s file metadata.



A list of Sphinx extensions to append to the extensions included in the Documenteer configuration preset (see Duplicate extensions are ignored.

Remember that additional packages may need to be added to your project’s Python dependencies (such as in a requirements.txt or pyproject.toml file).



Set to true to escalate Sphinx warnings to errors, which is useful for leveraging CI to notify you of any syntax errors. The default is false.

nitpicky = true

See nitpick_ignore and nitpick_ignore_regex for ways to suppress unavoidable errors.



A list of Sphinx warnings to ignore. Each item is a tuple of two items:

  1. type, often the reStructuredText role or directive creating the error/warning.

  2. target, often the argument to the reStructuredText role.

nitpick_ignore = [
  ["py:class", "fastapi.applications.FastAPI"],
  ["py:class", "httpx.AsyncClient"],
  ["py:class", "pydantic.main.BaseModel"],

This configuration extends the Sphinx nitpick_ignore configuration.



A list of Sphinx warnings to ignore, formatted as regular expressions. Each item is a tuple of two items:

  1. type, a regular expression of the warning type.

  2. target, a regular expression of the warning target.

nitpick_ignore_regex = [
  ['py:.*', 'fastapi.*'],
  ['py:.*', 'httpx.*'],
  ['py:.*', 'pydantic*'],


Use single quotes for literal strings in TOML.

This configuration extends the Sphinx nitpick_ignore_regex configuration.



Set this as a path to a reStructuredText file (relative to documenteer.toml and containing substitutions and link targets that are available to all documentation pages. This configuration sets Sphinx’s rst_epilog configuration. If set, the file is also included in the Sphinx source ignore list to prevent it from becoming a standalone page.

 rst_epilog_file = "_rst_epilog.rst"
.. _Astropy Project:

.. |required| replace:: :bdg-primary-line:`Required`
.. |optional| replace:: :bdg-secondary-line:`Optional`

See Using the rst epilog for common links and substitutions.



Set this to the directory where Python API documentation is generated, through automodapi. The default value is api, which is a good standard for Python projects with a public API.

If the Python API is oriented towards contributors, such as in an application or service, you can change the default:

python_api_dir = "dev/api/contents"



Configurations related to the Sphinx HTML theme.



Configurations related to Intersphinx for linking to other Sphinx projects.



A table of Sphinx projects. The labels are targets for the external role. The values are URLs to the root of Sphinx documentation projects.

sphinx = ""
documenteer = ""
python = ""

See the Intersphinx documentation for details on linking to other Sphinx projects.



Configurations related to Sphinx’s linkcheck builder.



List of URL regular expressions patterns to ignore checking. These are appended to the linkcheck_ignore configuration.