I am currently working on a project that is attempting to ‘blend’ rst files from four separate git repos into arbitrary doc sets. Each repo represents a set of product documentation with its own tox/sphinx environment. We do this by, for example, symlinking a doc from repo A into B at runtime and using a combination of substitutions and include files to handle most customizations.
It can get complicated. Sometimes we need to cross link files and modify indexes, sometimes we want to add a document, but without certain files or sections. Sometimes we need to link just a subset of files or a single file from one repo into another. In some cases we need to link a doc from A (an open source product) to C (a proprietary version) and then ‘add’ some proprietary files to the linked content. Cross linking between repos is achieved using intersphinx, but since one repo is hosted by an ‘upstream’ open source partner, but contains content pulled into different downstream repos, we parse objects.inv from that project and modify local copies of the source files with the appropriate intersphinx tags.
We run sphinx with the -W flag, so builds are picky about having exactly the .rst files required - and no more - in scope at build time.
This works, but I am looking for a cleaner approach. Two alternatives may be:
Has anyone dealt with a situation like this before? From my experience, Sphinx is not really intended to be used in a CMS type context, where a superset of content is mixed and matched into different subset configurations for different builds. Are we missing something about its behaviour that would allow a simpler approach? If not, has anyone come up with alternatives to the two options above or have experience with either?
Thanks!