0

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?

bad_coder
  • 11,289
  • 20
  • 44
  • 72
Paebbels
  • 15,573
  • 13
  • 70
  • 139

2 Answers2

0

Inside conf.py, there is a list that looks like this

 # List of patterns, relative to source directory, that match files and
 # directories to ignore when looking for source files.
 exclude_patterns = []

You can put the files you want to ignore inside it like

exclude_patterns = ["lib/cocotb", "lib/osvvm", "lib/vunit", "docs/_themes/sphinx_rtd_theme"]

Please note that here the pattern is relative to the source directory, you can put / at the beginning of each file pattern above to make this more clear.

xxks-kkk
  • 2,336
  • 3
  • 28
  • 48
  • When I compile my docs locally, these folders are not included. Excluding `*.rst`or other source files from search, does not prevent RTD from finding multiple `conf.py` files all over the repository. The `conf.py` file is located in `docs/source`. So these lib directories are out of scope. – Paebbels May 18 '16 at 16:26
  • You can try to specify all the relative path of `conf.py` in `exclude_patterns` to see if those files are still be included when you build – xxks-kkk May 19 '16 at 13:28
0

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

Paebbels
  • 15,573
  • 13
  • 70
  • 139