Sphinx toctree directive: How to hide the caption from being displayed?
14:20 29 Jun 2021

If I have the following in index.rst:

This Section
------------

.. toctree::
   :caption: This Section
   :maxdepth: 1

   this_section/intro
   this_section/body
   this_section/outro

Then "This Section" would show up twice in the generated HTML file: One as a

, one as a

. How can I get rid of the latter, or make :caption: generate a

? I can't simply remove :caption: because the sidebar (I'm using ReadTheDoc theme) relies on this option to correctly generate a TOC tree.

python-sphinx caption toctree