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