Improve documentation for the Builder API (#13008)

Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
This commit is contained in:
Tim Hoffmann
2024-10-12 01:21:34 +02:00
committed by GitHub
parent c46abc4721
commit b6269d3790
2 changed files with 33 additions and 18 deletions

View File

@@ -16,7 +16,7 @@ Builder API
.. rubric:: Overridable Attributes
These attributes should be set on builder sub-classes:
These class attributes should be set on builder sub-classes:
.. autoattribute:: name
.. autoattribute:: format
@@ -29,8 +29,7 @@ Builder API
.. rubric:: Core Methods
These methods are predefined and should generally not be overridden,
since they form the core of the build process:
These methods define the core build workflow and must not be overridden:
.. automethod:: build_all
.. automethod:: build_specific
@@ -73,11 +72,12 @@ Builder API
Builder sub-classes can set these attributes to support built-in extensions:
.. attribute:: supported_linkcode
:type: str
By default, the :mod:`linkcode <sphinx.ext.linkcode>` extension will
only inject references for an ``html`` builder.
The ``supported_linkcode`` attribute can be defined in a non-HTML builder
to support managing references generated by linkcode.
The ``supported_linkcode`` class attribute can be defined in a
non-HTML builder to support managing references generated by linkcode.
The expected value for this attribute is an expression
which is compatible with :rst:dir:`only`.