I am using Sphinx to document a non-Python project. I want to distribute ./doc
folders in each submodule, containing submodule_name.rst
files to document that module. I then want to suck those files into the master hierarchy to create a spec for the entire design.
I.e.:
Project
docs
spec
project_spec.rst
conf.py
modules
module1
docs
module1.rst
src
module2
docs
module2.rst
src
I attempted to include files in the master project_spec.rst
document toctree like this:
.. toctree::
:numbered:
:maxdepth: 2
Module 1 <../../modules/module1/docs/module1>
However this error message results:
WARNING: toctree contains reference to nonexisting document u'modules/module1/docs/module1'
Is it not possible to use ../
in a document path somehow?
Update: Added conf.py location
Update: Other than the include trick below, this is still (2019) not possible. There is an open issue that keeps getting pushed forward: https://github.com/sphinx-doc/sphinx/issues/701
.rst
extension to the lineModule 1 <../../modules/module1/docs/module1>
? – Noiselesssource_suffix
is set to.rst
in yourconf.py
configuration file. Also, where is this file in your directory hierarchy, since it seems that all paths are relative to this file? – Noiselesssource_suffix
is set to.rst
and theconf.py
is in the same folder as theproject_spec.rst
file. – Ministry