Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatic toctree update

I'm not sure if this is possible. But I'm hoping to put multiple .rst files in a directory, and during compilation. I want these files to automatically be inserted in the toctree. How can I go about this?

like image 291
kirikoumath Avatar asked Mar 16 '23 21:03

kirikoumath


1 Answers

You can use the glob option which enables wildcards. Like this:

.. toctree::
   :glob:

   *

This adds all other *.rst files in the same directory to the toctree.

Reference: "Use “globbing” in toctree directives"

like image 57
mzjn Avatar answered Mar 25 '23 00:03

mzjn