How to use captions in navigation sidebar when using autosummary?

52 views
Skip to first unread message

Connossor

unread,
Mar 19, 2020, 2:35:38 PM3/19/20
to sphinx-users
Hi,

Firstly, thanks for an absolutely fantastic library! Sphinx is proving tremendously useful.

I was wondering if it's possible to include a Caption when using autosummary. I'm using the ReadTheDocs theme. Currently my index.rst looks a bit like this:

Group1
======

.. autosummary::
   :toctree: _autosummary

   package1
   package2


Group2
======

.. autosummary::
   :toctree: _autosummary

   
package3
   package4


I wish to separate Group1 and Group2 in the navigation sidebar. I believe it's the "caption" TOC option. For example, as shown in this example: "THEME DOCUMENTATION" and "DEMO DOCUMENTS" are nicely separated. 

But this doesn't seem to be accepted when using autosummary. The code below fails. Any ideas?

Group1
======


.. autosummary::
   
:toctree: _autosummary
   :caption: Group 1

   package1
   package2



Group2
======


.. autosummary::
   
:toctree: _autosummary
   :caption: Group 2

   package3
   package4

Any advice greatly appreciated!
Reply all
Reply to author
Forward
0 new messages