'Sphinx multi-project monorepository

I have been trying to figure out how to set up sphinx to generate a master documentation for a multi-project setup. My question is directly related this one [1] on the same topic, but I am re-iterating it here as there doesn't seem to have been fully answered yet.

I am trying to generate a single documentation for a mono-repository that looks like this, where each project has its own individual sphinx docs.

monorepo/
|- project1/
| |- doc # Sphinx documentation for project 1
|- project2/
| |- doc # Sphinx documentation for project 2
|- doc/ # Master sphinx documentation combining docs from both projects

In [1] symlinking seems to be an option, but I was wondering if there any other more general solutions.

[1] - Combining Sphinx documentation from multiple subprojects: Handling indices, syncing configuration, etc

Many thanks in advance (edited to fix folder structure display)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source