Sphinx provides a toctree directive that can be used to inject a table of contents in a document, with links to other documents. Each line must be a file with its relative path, starting from the current document. Glob-style names can also be provided to add several files that match the expression.
For example, the index file in the cookbook folder, which we previously defined in the producer's landscape, can look like this:
======== Cookbook ======== Welcome to the Cookbook. Available recipes: .. toctree:: :glob:
*
With this syntax, the HTML page will display a list of all the reStructuredText documents available in the cookbook folder. This directive can be used in all the index files to build browsable documentation.