Lets say I have two .rst files, a welcome page (the index) and an API page. I would like them both to have identical toctrees, so it is easy to navigate from the one page to the other.
index.rst:
Welcome!
========
Welcome to these awesome docs!
api.rst:
API
===
Here is some API stuff...
I tried adding a toctree to index.rst
, something like this:
.. toctree::
:hidden:
index
api
However then my toctree gets nested:
I do not only want to add
.. toctree::
:hidden:
api
to index.rst and
.. toctree::
:hidden:
index
to api.rst, since that means that the sidebar is different between pages.
How do I add a global index to my project? One that is the same no matter which page I am on?