python-sphinx autosummary table of contents

Viewed 236

I'm trying to use sphinx.ext.autosummary extension to document my package.

In index.rst I have:

.. toctree::
    :maxdepth: 20
    :caption: References

    reference

And in reference.rst:

=============
API Reference
=============

.. autosummary::
    :recursive:
    :toctree: _api_reference

    mypackage

On the first page of the reference it creates a link table with only one entry for my package. I would like to have a list of modules on the first page too (like auto-api extension does). I could insert a toctree directive in the reference.rst, but in that case I have links for submodules twice in the side bar menu, and I have a link table with a package name in the first page of the reference and a table of contents after that with the same package name again.

Is there some way to place a table of contents with the package name and list of modules on the first page of the API reference generated with the autosummary?

0 Answers
Related