I made a Sphinx project with an index file and two other rst files called firstdoc.rst
and seconddoc.rst
. My index.rst
has the following toctree:
.. toctree::
:maxdepth: 2
:caption: Contents:
firstdoc
seconddoc
I ran make html
after adding the firstdoc.rst
and then again after adding seconddoc.rst
.
Now when I transfer the _build/html
directory to a server I find that the index page has a side bar which lists both the firstdoc and seconddoc pages. The firstdoc page does not list any pages in the side bar. The seconddoc page lists the firstdoc page but not the seconddoc page in the side bar.
I want all the pages to list all the pages in the sidebar. How should I go about this?
Edit: If I edit the firstdoc.rst and seconddoc.rst files and then run make html
and then transfer firstdoc.html and seconddoc.html to the server then I get what I want. That is all the pages are shown in the sidebar of all the pages. This seems very unsatisfactory as it means every time I add a new page to my project I have to edit all the existing pages in the project in order for them to include the new page in their side bar. Is there a more convenient way?