Sphinx jinja: different header levels

25 Views Asked by At

I would like to create 'section' and 'subsection' headers using _templates/autosummary/module.rst.

The former I found as {{ name | underline }}

I don't know how to do this at several levels:

{{ name | underline }}

.. automodule:: {{ fullname }}

   {% block functions %}
   {% if functions %}
   {% for item in functions %}
.. <- subsection header here
   .. autofunction:: {{ item }}
   {%- endfor %}
   {% endif %}
   {% endblock %}

Background information

I call this with:

.. currentmodule:: depinning_inertia_2024

.. autosummary::
    :toctree: generated

    foo
0

There are 0 best solutions below