This documentation is generated via the Sphinx tool from sources in the tree.
To build the documentation, run
mach doc. Run
mach help doc to see configurable options.
To add new documentation, define the
SPHINX_PYTHON_PACKAGE_DIRS variables in
moz.build files in the tree and documentation will automatically get picked up.
Say you have a directory
featureX you would like to write some documentation for. Here are the steps to create Sphinx documentation for it:
index.rstfile in this directory. The
index.rstfile is the root documentation for that section. See
build/docs/index.rstfor an example file.
moz.buildfile (typically the one in the parent directory of the
SPHINX_TREESto hook up the plumbing. e.g.
SPHINX_TREES['featureX'] = 'docs'. This says the ``docs`` directory under the current directory should be installed into the Sphinx documentation tree under ``/featureX``.
SPHINX_PYTHON_PACKAGE_DIRSto declare directories containing Python packages. e.g.
SPHINX_PYTHON_PACKAGE_DIRS += ['mozpackage'].