Skip to content

Commit 13f98f6

Browse files
committed
Format autosummary options in docs
1 parent d374a1c commit 13f98f6

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

doc/usage/extensions/autosummary.rst

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -61,63 +61,63 @@ The :mod:`sphinx.ext.autosummary` extension does this in two parts:
6161
:event:`autodoc-process-docstring` and :event:`autodoc-process-signature`
6262
hooks as :mod:`~sphinx.ext.autodoc`.
6363

64-
**Options**
64+
.. rubric:: Options
6565

66-
* If you want the :rst:dir:`autosummary` table to also serve as a
67-
:rst:dir:`toctree` entry, use the ``toctree`` option, for example::
66+
.. rst:directive:option:: toctree: optional directory name
67+
68+
If you want the :rst:dir:`autosummary` table to also serve as a
69+
:rst:dir:`toctree` entry, use the ``toctree`` option, for example::
6870
6971
.. autosummary::
7072
:toctree: DIRNAME
7173
7274
sphinx.environment.BuildEnvironment
7375
sphinx.util.relative_uri
7476
75-
The ``toctree`` option also signals to the :program:`sphinx-autogen` script
76-
that stub pages should be generated for the entries listed in this
77-
directive. The option accepts a directory name as an argument;
78-
:program:`sphinx-autogen` will by default place its output in this
79-
directory. If no argument is given, output is placed in the same directory
80-
as the file that contains the directive.
77+
The ``toctree`` option also signals to the :program:`sphinx-autogen` script
78+
that stub pages should be generated for the entries listed in this
79+
directive. The option accepts a directory name as an argument;
80+
:program:`sphinx-autogen` will by default place its output in this
81+
directory. If no argument is given, output is placed in the same directory
82+
as the file that contains the directive.
8183
82-
You can also use ``caption`` option to give a caption to the toctree.
84+
.. rst:directive:option:: caption: caption of ToC
8385
84-
.. versionadded:: 3.1
86+
Add a caption to the toctree.
8587
86-
caption option added.
88+
.. versionadded:: 3.1
8789
88-
* If you don't want the :rst:dir:`autosummary` to show function signatures in
89-
the listing, include the ``nosignatures`` option::
90+
.. rst:directive:option:: no-signatures
9091
91-
.. autosummary::
92-
:nosignatures:
92+
Do not show function signatures in the summary.
9393
94-
sphinx.environment.BuildEnvironment
95-
sphinx.util.relative_uri
94+
.. rst:directive:option:: template: filename
9695
97-
* You can specify a custom template with the ``template`` option.
98-
For example, ::
96+
Specify a custom template for rendering the summary.
97+
For example, ::
9998
10099
.. autosummary::
101100
:template: mytemplate.rst
102101
103102
sphinx.environment.BuildEnvironment
104103
105-
would use the template :file:`mytemplate.rst` in your
106-
:confval:`templates_path` to generate the pages for all entries
107-
listed. See `Customizing templates`_ below.
104+
would use the template :file:`mytemplate.rst` in your
105+
:confval:`templates_path` to generate the pages for all entries
106+
listed. See `Customizing templates`_ below.
107+
108+
.. versionadded:: 1.0
108109
109-
.. versionadded:: 1.0
110+
.. rst:directive:option:: recursive
110111
111-
* You can specify the ``recursive`` option to generate documents for
112-
modules and sub-packages recursively. It defaults to disabled.
113-
For example, ::
112+
Generate documents for modules and sub-packages recursively.
113+
For example, ::
114114
115115
.. autosummary::
116116
:recursive:
117117
118118
sphinx.environment.BuildEnvironment
119119
120-
.. versionadded:: 3.1
120+
.. versionadded:: 3.1
121121
122122
123123
:program:`sphinx-autogen` -- generate autodoc stub pages

0 commit comments

Comments
 (0)