0

I am using Sphinx and ReStructuredText to create documentation, but even though all pages were created the same way, only 4 out of 8 are showing on the side menu. This is my table of contents:

.. toctree::

   :glob:
   :titlesonly:
   
   *

I've tried to add the pages manually, but it didn't seem to work either. Here's the link to the documentation where you can find the source code: Docs

sinoroc
  • 18,409
  • 2
  • 39
  • 70
  • In your `conf.py`, the value for [`html_sidebars`](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_sidebars) is not correct for your Sphinx theme. You don't have custom templates in your repo. Remove this value, and try again. – Steve Piercy Jan 27 '23 at 04:45
  • I tried it, but it's still only showing half of the pages – Agatha Garcia Jan 27 '23 at 18:15

1 Answers1

2

You should use either correct syntax of the toctree directive when using its options, or use file names whose casing aligns with what you put in the toctree directive.

The .rst files in your directory are the following.

Coordenadas.rst
Galeria-mapa.rst
Home-page.rst
Lista-camadas.rst
index.rst
legenda.rst
marcador.rst
medicao.rst
oscilar.rst

But in your index.rst you use the incorrect case for those filenames, and you add a blank line between the file names and glob character without using the glob option.

.. toctree::

   Home-page
   Coordenadas
   Galeria-mapa
   Legenda
   Lista-camadas
   Marcador
   Medicao
   Oscilar

   *

By looking at the build log on Read The Docs, you would find several warnings indicating what went wrong.

/home/docs/checkouts/readthedocs.org/user_builds/documentation-senografia/checkouts/latest/docs/source/index.rst:5: WARNING: toctree contains reference to nonexisting document 'Legenda'

To fix it, this is one option.

.. toctree::

   Home-page
   Coordenadas
   Galeria-mapa
   legenda
   Lista-camadas
   marcador
   medicao
   oscilar

And this should work, too. Note that in this version compared to yours, the options are immediately after the toctree directive without a blank line between them. A blank line should be present before the first toctree entry.

.. toctree::
    :glob:
    :titlesonly:

    *
Steve Piercy
  • 13,693
  • 1
  • 44
  • 57