Mozilla Source Tree Documentation¶
- SSL Error Reporting
- tabbrowser
- Firefox
- Telemetry Experiments
- Form Autofill
- Installer
- Build System
- WebIDL
- Graphics
- Fluent
- Firefox for Android
- Indices and tables
- mozbase
- Indices and tables
- mach
- TaskCluster Task-Graph Generation
- geckodriver
- Marionette
- Crash Manager
- WebExtensions API Development
- Shield Recipe Client
- WebPayments UI
- Telemetry
- URL Classifier
- Crash Reporter
- Supbrocess Module
- Toolkit modules
- Add-on Manager
- Localization
- Linting
- Indices and tables
- Try Server
Python Packages¶
- mach package
- mozbuild package
- Subpackages
- Submodules
- mozbuild.android_version_code module
- mozbuild.artifacts module
- mozbuild.base module
- mozbuild.chunkify module
- mozbuild.config_status module
- mozbuild.doctor module
- mozbuild.dotproperties module
- mozbuild.faster_daemon module
- mozbuild.generated_sources module
- mozbuild.gn_processor module
- mozbuild.html_build_viewer module
- mozbuild.jar module
- mozbuild.mach_commands module
- mozbuild.makeutil module
- mozbuild.mozconfig module
- mozbuild.mozinfo module
- mozbuild.preprocessor module
- mozbuild.pythonutil module
- mozbuild.schedules module
- mozbuild.shellutil module
- mozbuild.sphinx module
- mozbuild.testing module
- mozbuild.util module
- mozbuild.vendor_aom module
- mozbuild.vendor_rust module
- mozbuild.virtualenv module
- Module contents
- mozlint package
- mozpack package
- mozversioncontrol package
- mozwebidlcodegen package
- taskgraph package
- Subpackages
- Submodules
- taskgraph.config module
- taskgraph.create module
- taskgraph.decision module
- taskgraph.docker module
- taskgraph.files_changed module
- taskgraph.filter_tasks module
- taskgraph.generator module
- taskgraph.graph module
- taskgraph.morph module
- taskgraph.optimize module
- taskgraph.parameters module
- taskgraph.target_tasks module
- taskgraph.task module
- taskgraph.taskgraph module
- taskgraph.try_option_syntax module
- Module contents
Managing Documentation¶
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.
Adding Documentation¶
To add new documentation, define the SPHINX_TREES
and
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:
- Create a directory for the docs. This is typically
docs
. e.g.featureX/docs
. - Create an
index.rst
file in this directory. Theindex.rst
file is the root documentation for that section. Seebuild/docs/index.rst
for an example file. - In a
moz.build
file (typically the one in the parent directory of thedocs
directory), defineSPHINX_TREES
to 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``. - If you have Python packages you would like to generate Python API
documentation for, you can use
SPHINX_PYTHON_PACKAGE_DIRS
to declare directories containing Python packages. e.g.SPHINX_PYTHON_PACKAGE_DIRS += ['mozpackage']
.