How to manage different root documents in a sphinx project?

Viewed 19

I have a collection of rst files in a sphinx project and I need to generate several documents, each one including a selection of these rst files.

Example:

.
└── source
    ├── external_documents.rst
    ├── install.rst
    ├── last_evolutions.rst
    ├── tips.rst
    └── tutorial.rst

I want to generate a User Guide with all the rst files and I have to produce a Version Description Document including last_evolutions.rst and external_documents.rst only. The solution I have found is to create two separate root files defining the content of each document in a toctree. Then I generate each document by specifying the root file to use with the option root_doc.

It does the job but I have two problems :

  1. Sphinx raises a warning for each not-included rst file
  2. Sphinx generates a html file for all the rst files, even the not-included ones.

Is there a way to ask sphinx to ignore all the files that are not included in the root file ? If not, is there a better solution to my need ?

0 Answers
Related