API Reference

Directive reference

Generated from add_directive() registrations in sphinx_autodoc_sphinx/__init__.py via sphinx-autodoc-docutils — a meta-loop where the package that documents config values uses its sibling package to document its own directives.

.. autoconfigvalue::
directive
directive
.. autoconfigvalue::

Render one config value from a fully-qualified module.option path.

Options:

Python path:

sphinx_autodoc_sphinx._directives.AutoconfigvalueDirective

Required arguments:

1

Optional arguments:

0

Final argument whitespace:

False

Has content:

False

:no-index:
option
option
:no-index:

Validator: flag.

.. autoconfigvalues::
directive
directive
.. autoconfigvalues::

Render all config values registered by one extension module.

Options:

Python path:

sphinx_autodoc_sphinx._directives.AutoconfigvaluesDirective

Required arguments:

1

Optional arguments:

0

Final argument whitespace:

False

Has content:

False

:exclude:
option
option
:exclude:

Validator: unchanged.

:no-index:
option
option
:no-index:

Validator: flag.

.. autobuilder::
directive
directive
.. autobuilder::

Render documentation for a single builder class.

Options:

Python path:

sphinx_autodoc_sphinx._builders_doc.AutoBuilder

Required arguments:

1

Optional arguments:

0

Final argument whitespace:

False

Has content:

False

:no-index:
option
option
:no-index:

Validator: flag.

.. autobuilders::
directive
directive
.. autobuilders::

Render documentation for every builder a package registers.

Options:

Python path:

sphinx_autodoc_sphinx._builders_doc.AutoBuilders

Required arguments:

1

Optional arguments:

0

Final argument whitespace:

False

Has content:

False

:no-index:
option
option
:no-index:

Validator: flag.

.. autodomain::
directive
directive
.. autodomain::

Render documentation for a single domain class.

Options:

Python path:

sphinx_autodoc_sphinx._domains_doc.AutoDomain

Required arguments:

1

Optional arguments:

0

Final argument whitespace:

False

Has content:

False

:no-index:
option
option
:no-index:

Validator: flag.

.. autodomains::
directive
directive
.. autodomains::

Render documentation for every domain a package registers.

Options:

Python path:

sphinx_autodoc_sphinx._domains_doc.AutoDomains

Required arguments:

1

Optional arguments:

0

Final argument whitespace:

False

Has content:

False

:no-index:
option
option
:no-index:

Validator: flag.

Cross-reference roles

The extension registers a sphinxext Sphinx domain. Every component entry rendered without :no-index: becomes a link target for the matching role:

Role

Links to

{sphinxext:builder}`Name`

autobuilder / autobuilders entries

{sphinxext:domain}`Name`

autodomain / autodomains entries

Targets accept the fully-qualified dotted path ({sphinxext:builder}`pkg.builders.ZipBuilder`) or the bare class name when it is unambiguous across the project. Dangling references warn at build time.

The domain also ships a grouped components index: Sphinx extension components index.

Extension entry point

sphinx_autodoc_sphinx.setup(app)
function[source]
function[source]
sphinx_autodoc_sphinx.setup(app)

Register config-value documentation directives.

Examples

>>> class FakeApp:
...     def __init__(self) -> None:
...         self.calls: list[tuple[str, object]] = []
...     def setup_extension(self, name: str) -> None:
...         self.calls.append(("setup_extension", name))
...     def add_directive(self, name: str, directive: object) -> None:
...         self.calls.append(("add_directive", name))
...     def add_domain(self, domain: object) -> None:
...         self.calls.append(("add_domain", domain))
...     def connect(self, event: str, handler: object) -> None:
...         self.calls.append(("connect", event))
...     def add_css_file(self, filename: str) -> None:
...         self.calls.append(("add_css_file", filename))
>>> fake = FakeApp()
>>> metadata = setup(fake)  # type: ignore[arg-type]
>>> ("add_directive", "autoconfigvalue") in fake.calls
True
>>> ("add_domain", SphinxExtDomain) in fake.calls
True
>>> ("setup_extension", "sphinx_ux_autodoc_layout") in fake.calls
True
>>> ("add_css_file", "css/sphinx_autodoc_sphinx.css") in fake.calls
True
>>> metadata["parallel_read_safe"]
True
Parameters:

app (Sphinx)

Return type:

ExtensionMetadata