Skip to content

Commit

Permalink
Format autosummary options in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
timhoffm committed Nov 6, 2024
1 parent d374a1c commit 13f98f6
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions doc/usage/extensions/autosummary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,63 +61,63 @@ The :mod:`sphinx.ext.autosummary` extension does this in two parts:
:event:`autodoc-process-docstring` and :event:`autodoc-process-signature`
hooks as :mod:`~sphinx.ext.autodoc`.

**Options**
.. rubric:: Options

* If you want the :rst:dir:`autosummary` table to also serve as a
:rst:dir:`toctree` entry, use the ``toctree`` option, for example::
.. rst:directive:option:: toctree: optional directory name
If you want the :rst:dir:`autosummary` table to also serve as a
:rst:dir:`toctree` entry, use the ``toctree`` option, for example::
.. autosummary::
:toctree: DIRNAME
sphinx.environment.BuildEnvironment
sphinx.util.relative_uri
The ``toctree`` option also signals to the :program:`sphinx-autogen` script
that stub pages should be generated for the entries listed in this
directive. The option accepts a directory name as an argument;
:program:`sphinx-autogen` will by default place its output in this
directory. If no argument is given, output is placed in the same directory
as the file that contains the directive.
The ``toctree`` option also signals to the :program:`sphinx-autogen` script
that stub pages should be generated for the entries listed in this
directive. The option accepts a directory name as an argument;
:program:`sphinx-autogen` will by default place its output in this
directory. If no argument is given, output is placed in the same directory
as the file that contains the directive.
You can also use ``caption`` option to give a caption to the toctree.
.. rst:directive:option:: caption: caption of ToC
.. versionadded:: 3.1
Add a caption to the toctree.
caption option added.
.. versionadded:: 3.1
* If you don't want the :rst:dir:`autosummary` to show function signatures in
the listing, include the ``nosignatures`` option::
.. rst:directive:option:: no-signatures
.. autosummary::
:nosignatures:
Do not show function signatures in the summary.
sphinx.environment.BuildEnvironment
sphinx.util.relative_uri
.. rst:directive:option:: template: filename
* You can specify a custom template with the ``template`` option.
For example, ::
Specify a custom template for rendering the summary.
For example, ::
.. autosummary::
:template: mytemplate.rst
sphinx.environment.BuildEnvironment
would use the template :file:`mytemplate.rst` in your
:confval:`templates_path` to generate the pages for all entries
listed. See `Customizing templates`_ below.
would use the template :file:`mytemplate.rst` in your
:confval:`templates_path` to generate the pages for all entries
listed. See `Customizing templates`_ below.
.. versionadded:: 1.0
.. versionadded:: 1.0
.. rst:directive:option:: recursive
* You can specify the ``recursive`` option to generate documents for
modules and sub-packages recursively. It defaults to disabled.
For example, ::
Generate documents for modules and sub-packages recursively.
For example, ::
.. autosummary::
:recursive:
sphinx.environment.BuildEnvironment
.. versionadded:: 3.1
.. versionadded:: 3.1
:program:`sphinx-autogen` -- generate autodoc stub pages
Expand Down

0 comments on commit 13f98f6

Please sign in to comment.