DocumenteerConfig

class documenteer.conf.DocumenteerConfig(conf)

Bases: object

Configuration from a documenteer.toml file.

Parameters:

conf (ConfigRoot)

Attributes Summary

automodapi_toctreedirm

base_url

Base root URL for the site.

copyright

The copyright statement.

github_url

The project's GitHub repository.

header_links_before_dropdown

Number of links to show in the nav head before folding extra items into a More dropdown.

nitpicky

project

Project title.

redirects

Redirects defined in the [sphinx.redirects] TOML configuration.

rst_epilog

Content of the user's reStructuredText epilog, or an empty string if not set.

rst_epilog_path

Path to the user's reStructuredText epilog file, if set.

version

The project's version.

Methods Summary

append_extensions(extensions)

Append user-configured extensions to an existing list.

append_linkcheck_ignore(link_patterns)

Append URL patterns for sphinx.linkcheck.ignore to existing patterns.

append_nitpick_ignore(nitpick_ignore)

append_nitpick_ignore_regex(nitpick_ignore_regex)

disable_primary_sidebars(html_sidebars)

extend_exclude_patterns(exclude_patterns)

Extend Sphinx exclude_patterns with the "exclude" configuration from the sphinx TOML table.

extend_intersphinx_mapping(mapping)

Extend the intersphinx_mapping dictionary with configured projects.

find_and_load()

load(toml_content)

set_edit_on_github(html_theme_options, ...)

Configure the Edit on GitHub functionality, if possible.

Attributes Documentation

automodapi_toctreedirm
base_url

Base root URL for the site.

The URL is obtained in this order:

  1. The base_url field of the [project] table in documenteer.toml.

  2. From importlib.metadata if [project.python] is set in documenteer.toml.

  3. Default is “”.

copyright

The copyright statement.

Default is "" if not set.

github_url

The project’s GitHub repository.

The GitHub URL is obtained in this order:

  1. The project.github_url field in documenteer.toml

  2. From importlib if the project.python table is set

  3. Default is None.

Number of links to show in the nav head before folding extra items into a More dropdown.

nitpicky
project

Project title.

redirects

Redirects defined in the [sphinx.redirects] TOML configuration.

rst_epilog

Content of the user’s reStructuredText epilog, or an empty string if not set.

rst_epilog_path

Path to the user’s reStructuredText epilog file, if set.

version

The project’s version.

The version is obtained in this order:

  1. project.version field in documenteer.toml

  2. From importlib if the project.python table is set

  3. Default is “Latest”.

Methods Documentation

append_extensions(extensions)

Append user-configured extensions to an existing list.

Parameters:

extensions (list[str])

Return type:

None

append_linkcheck_ignore(link_patterns)

Append URL patterns for sphinx.linkcheck.ignore to existing patterns.

Parameters:

link_patterns (list[str])

Return type:

None

append_nitpick_ignore(nitpick_ignore)
Parameters:

nitpick_ignore (list[tuple[str, str]])

Return type:

None

append_nitpick_ignore_regex(nitpick_ignore_regex)
Parameters:

nitpick_ignore_regex (list[tuple[str, str]])

Return type:

None

disable_primary_sidebars(html_sidebars)
Parameters:

html_sidebars (MutableMapping[str, list[str]])

Return type:

None

extend_exclude_patterns(exclude_patterns)

Extend Sphinx exclude_patterns with the “exclude” configuration from the sphinx TOML table.

Parameters:

exclude_patterns (list[str])

Return type:

None

extend_intersphinx_mapping(mapping)

Extend the intersphinx_mapping dictionary with configured projects.

Parameters:

mapping (MutableMapping[str, tuple[str, str | None]])

Return type:

None

classmethod find_and_load()
Return type:

DocumenteerConfig

classmethod load(toml_content)
Parameters:

toml_content (str)

Return type:

DocumenteerConfig

set_edit_on_github(html_theme_options, html_context)

Configure the Edit on GitHub functionality, if possible.

Parameters:
Return type:

None