sphinx icon indicating copy to clipboard operation
sphinx copied to clipboard

Add support for sub-modules in autosummary

Open gregory-shklover opened this issue 2 years ago • 1 comments

Subject: Adds support for "modules" template argument so one can generate recursive documentation.

Feature or Bugfix

  • Feature

Purpose

Adds support for generating recursive module documentation. For each module, documents imported sub-modules and adds corresponding "modules" template parameter. The parameter can be used in a module template like this: ... .. automodule:: {{ fullname }}

 {% block modules %}
 {% if modules %}
 .. rubric:: Modules

 .. autosummary::
    :toctree: {{ name }}
 {% for item in modules %}
    {{ item }}
 {%- endfor %}
 {% endif %}
 {% endblock %}

...

Detail

Relates

gregory-shklover avatar Apr 27 '23 08:04 gregory-shklover

Converted to "draft" to resolve differences vs ":recursive:" feature in autosummary.

gregory-shklover avatar Apr 30 '23 09:04 gregory-shklover