How do I include the homepage in the Sphinx TOC?

Turns out the answer was hiding in plain sight on Sphinx’s TOC tree page:

The special entry name self stands for the document containing the toctree directive. This is useful if you want to generate a “sitemap” from the toctree.

Adding self to the TOC tree did the trick perfectly! And if you place it in a separate, hidden toctree directive, it won’t show up on the homepage’s table of contents either:

.. toctree::
   :hidden:

   self


.. toctree::
   :titlesonly:

   installation
   templating/index

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)