Reputation: 198
Here in Sphinx's documentation it is said what those templates can be redefined.
So I tried to copy module.rst
from /site-packages/sphinx/ext/autosummary
to source/_templates/autosummary
(also tried just source/_templates
) with some slight changes. But after I regenerated the docs nothing changed.
Maybe i should add some specific option to .. autosummary::
tag to specify custom template directory? (in conf.py directory is set right and sphinx see html
templates as well)
UPD: source code: https://github.com/actionless/wooper/blob/master/docs.sh
Upvotes: 6
Views: 6033
Reputation: 99
Edited: I've originally posted an answer to the wrong issue here. However, might help as well here.
One can 'overrule' the default templates by adding a custom file into the _templates
folder. E.g., if you want to change the template for classes used when calling the autosummary directive create a custom class.rst
file under this path:
_templates/autosummary/class.rst
Should be taken automatically without the need of specifying :template:
explicitly.
Upvotes: 0
Reputation: 50947
It should work if you do the following:
templates_path
configuration variable is set to ['_templates']
in conf py._templates
subdirectory. Use the :template:
option:
.. autosummary::
:template: mytemplate.rst
Upvotes: 6