Create single Sphinx documentation page on readthedocs.org from multiple Python repositories

18 views
Skip to first unread message

Michael Weinold

unread,
Nov 22, 2022, 11:58:25 PM11/22/22
to sphinx-users
I have an open source project split into different repositories, which I would like to document on a single readthedocs page (using, for instance, sphinx.ext.autosummary).

For now, the Sphinx conf.py and the master toctree document are contained in a separate docs repo:

docs
├── index.rst
├── conf.py
└── ... foobar
├── foo
│    └── __init__.py
└── bar
├── __init__.py
└── baz
└── __init__.py

Building the Sphinx documentation locally, I could simply download all repositories and use relative paths to direct Sphinx to the different repositories, e.g.:

sys.path.insert(0, os.path.abspath('../foobar'))

However, this won't work building the project at readthedocs.org.

I searched, but found only one solution that "(copies) all of the packages within the repo to a temporary folder, which will allow the docstring tool to scan and then generate the relevant docs." In a variation of this, symlinks are to be used.

This is likely not the optimal solution. Am I missing some basic functionality of Sphinx?


Reply all
Reply to author
Forward
0 new messages