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::¶.. autoconfigvalue::¶
Render one config value from a fully-qualified
module.optionpath.Options:
- Python path:
- Required arguments:
1- Optional arguments:
0- Final argument whitespace:
False- Has content:
False
-
.. autoconfigvalues::¶.. autoconfigvalues::¶
Render all config values registered by one extension module.
Options:
- Python path:
- Required arguments:
1- Optional arguments:
0- Final argument whitespace:
False- Has content:
False
-
.. autobuilder::¶.. autobuilder::¶
Render documentation for a single builder class.
Options:
- Python path:
- Required arguments:
1- Optional arguments:
0- Final argument whitespace:
False- Has content:
False
-
.. autobuilders::¶.. autobuilders::¶
Render documentation for every builder a package registers.
Options:
- Python path:
- Required arguments:
1- Optional arguments:
0- Final argument whitespace:
False- Has content:
False
-
.. autodomain::¶.. autodomain::¶
Render documentation for a single domain class.
Options:
- Python path:
- Required arguments:
1- Optional arguments:
0- Final argument whitespace:
False- Has content:
False
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 |
|---|---|
|
|
|
|
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)¶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: