Search code examples
python-sphinxgit-submodulesread-the-docs

RTD compiles all my docs including foreign docs from git submodules


I'm experimenting with Sphinx and ReadTheDocs (RTD) to compile my documentation on every GitHub push. Unfortunately, RTD found multiple doc/docs folders containing a conf.py file.

My repository uses git sub-modules to embed third party libraries. Some of them are also documented using Sphinx. I assume the biggest (long lasting documentation build) wins and overwrites all static HTML pages in the final RTD view.

How can I exclude or tell RTD to ignore the folders of these sub-modules:

lib/cocotb
lib/osvvm
lib/vunit
docs/source/_themes/sphinx_rtd_theme

My documentation is located here:

docs/source/conf.py
docs/source/index.rst

As far as I have found, RTD does support *.yml files, but there is no entry to define the documentation root folder.

Any ideas to solve my problem?


Solution

  • The main documentation folder and its conf.py can be configured in the Advanced Settings tab in the per project settings.

    Example value: documentation/conf.py