Reformat autosummary docs.

This commit is contained in:
Georg Brandl 2009-05-17 12:29:38 +02:00
parent 8bb67b9bf0
commit 7749debcdc

View File

@ -130,11 +130,10 @@ also use this new config value:
.. confval:: autosummary_generate
Boolean indicating whether to scan all found documents for
autosummary directives, and to generate stub pages for each.
Boolean indicating whether to scan all found documents for autosummary
directives, and to generate stub pages for each.
Can also be a list of documents for which stub pages should be
generated.
Can also be a list of documents for which stub pages should be generated.
The new files will be placed in the directories specified in the
``:toctree:`` options of the directives.
@ -143,25 +142,24 @@ also use this new config value:
Customizing templates
---------------------
You can customize the stub page templates, in a similar way as the
HTML Jinja templates, see
:ref:`templating`. (:class:`~sphinx.application.TemplateBridge` is not
supported.)
You can customize the stub page templates, in a similar way as the HTML Jinja
templates, see :ref:`templating`. (:class:`~sphinx.application.TemplateBridge`
is not supported.)
.. note::
If you find yourself spending much time tailoring the stub
templates, this may indicate that it's a better idea to write
custom narrative documentation instead.
If you find yourself spending much time tailoring the stub templates, this
may indicate that it's a better idea to write custom narrative documentation
instead.
Autosummary uses the following template files:
- :file:`autosummary/base.rst` -- fallback template
- :file:`autosummary/module.rst` -- template for modules
- :file:`autosummary/class.rst` -- template for classes
- :file:`autosummary/function.rst` -- template for functions
- :file:`autosummary/attribute.rst` -- template for class attributes
- :file:`autosummary/method.rst` -- template for class methods
- :file:`autosummary/base.rst` -- fallback template
- :file:`autosummary/module.rst` -- template for modules
- :file:`autosummary/class.rst` -- template for classes
- :file:`autosummary/function.rst` -- template for functions
- :file:`autosummary/attribute.rst` -- template for class attributes
- :file:`autosummary/method.rst` -- template for class methods
The following variables available in the templates:
@ -183,8 +181,8 @@ The following variables available in the templates:
.. data:: class
Name of the class the documented object belongs to.
Only available for methods and attributes.
Name of the class the documented object belongs to. Only available for
methods and attributes.
.. data:: underline
@ -192,36 +190,36 @@ The following variables available in the templates:
.. data:: members
List containing names of all members of the module or class.
Only available for modules and classes.
List containing names of all members of the module or class. Only available
for modules and classes.
.. data:: functions
List containing names of "public" functions in the module.
Here, "public" here means that the name does not start with an
underscore. Only available for modules.
List containing names of "public" functions in the module. Here, "public"
here means that the name does not start with an underscore. Only available
for modules.
.. data:: classes
List containing names of "public" classes in the module.
Only available for modules.
List containing names of "public" classes in the module. Only available for
modules.
.. data:: exceptions
List containing names of "public" exceptions in the module.
Only available for modules.
List containing names of "public" exceptions in the module. Only available
for modules.
.. data:: methods
List containing names of "public" methods in the class.
Only available for classes.
List containing names of "public" methods in the class. Only available for
classes.
.. data:: methods
List containing names of "public" attributes in the class.
Only available for classes.
List containing names of "public" attributes in the class. Only available
for classes.
.. note::
You can use the :dir:`autosummary` directive in the stub pages.
However, stub pages are not generated automatically recursively.
You can use the :dir:`autosummary` directive in the stub pages. However,
stub pages are not generated automatically recursively.