Hi,
I'm having trouble using custom templates with autosummary. Essentially I
want a very slightly modified module.rst template, which will add :toctree:
directives
in order to generate stub files for all members.
So, I have added a module.rst file to _templates/autosummary; I've added
this directory to the templates_path list in conf.py and I added :template:
module to my index.rst file.
However, nothing is changed and the documentation is generated as if this
file didn't exist. Is there something I'm doing wrong, or something I'm
missing?
Any help would be greatly appreciated!
Below are the relevant code snippets:
In my *conf.py* :
templates_path = ['doc_templates', 'doc_templates/autosummary']
In *index.rst*:
.. autosummary::
:template: module
:toctree: _autosummary
personne
recherche
And finally my *module.rst* template:
{{ fullname }}
{{ underline }}
.. automodule:: {{ fullname }}
{% block functions %}
{% if functions %}
.. rubric:: Fonctions
.. autosummary::
:toctree:
{% for item in functions %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
{% block classes %}
{% if classes %}
.. rubric:: Classes
.. autosummary::
:toctree:
{% for item in classes %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
{% block exceptions %}
{% if exceptions %}
.. rubric:: Exceptions
.. autosummary::
:toctree:
{% for item in exceptions %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
--
You received this message because you are subscribed to the Google Groups
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.