I have configured Sphinx to use markdown files.
In my index.rst file I have
.. toctree::
:maxdepth: 2
:caption: Contents:
documents/Markdown
In Markdown.md I have
# Markdown
## H2 Heading
When I render the main page I get the H2 heading appearing in the toctree.
I have other parts of my toctree where I want a :maxdepth of more than 1. Why does sphinx read the H2 heading as part of the toctree, and how can I get it to stop doing this, without having to set the the :maxdepth to 1?
:maxdepth:1
will limit the depth for all entries and you did not specify how can you use different depths for different tree entries. – Punic