Bug 1594925 - Create a documentation section in the doc r=ahal
authorSylvestre Ledru <sledru@mozilla.com>
Fri, 15 Nov 2019 21:01:04 +0000
changeset 502307 63815205b4125472179488e6bf2e1123a1414390
parent 502306 c078f40b72b1c246d0475e443bfa70fb7e74db2e
child 502308 51ff4505135988dd5d10036c21d2c815bff30830
push id100741
push usersledru@mozilla.com
push dateFri, 15 Nov 2019 22:17:46 +0000
treeherderautoland@51ff45051359 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1594925
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1594925 - Create a documentation section in the doc r=ahal Differential Revision: https://phabricator.services.mozilla.com/D52273
tools/docs/config.yml
tools/docs/docs/adding-documentation.rst
tools/docs/docs/index.rst
tools/docs/index.rst
tools/moz.build
--- a/tools/docs/config.yml
+++ b/tools/docs/config.yml
@@ -13,16 +13,17 @@ categories:
         - remote
         - services/common/services
         - uriloader
     build_doc:
         - mach
         - tools/try
         - build/buildsystem
         - taskcluster
+        - tools/docs
     testing_doc:
         - testing/marionette
         - testing/geckodriver
     code_quality_doc:
         - tools/lint
     l10n_doc:
         - intl
         - tools/compare-locales
new file mode 100644
--- /dev/null
+++ b/tools/docs/docs/adding-documentation.rst
@@ -0,0 +1,27 @@
+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:
+
+1. Create a directory for the docs. This is typically ``docs``. e.g.
+   ``featureX/docs``.
+2. Create an ``index.rst`` file in this directory. The ``index.rst`` file
+   is the root documentation for that section. See ``build/docs/index.rst``
+   for an example file.
+3. In a ``moz.build`` file (typically the one in the parent directory of
+   the ``docs`` directory), define ``SPHINX_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``*.
+4. 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']``.
+5. In ``tools/docs/config.yml``, defines in which category the doc
+   should go.
new file mode 100644
--- /dev/null
+++ b/tools/docs/docs/index.rst
@@ -0,0 +1,18 @@
+Managing Documentation
+======================
+
+This documentation is generated via the
+`Sphinx <http://sphinx-doc.org/>`_ tool from sources in the tree.
+
+To build the documentation, run ``mach doc``. Run
+``mach help doc`` to see configurable options.
+
+MDN should not be used for Firefox/Gecko processes or source code
+documentation.
+
+.. toctree::
+  :caption: Documentation
+  :maxdepth: 2
+  :glob:
+
+  *
--- a/tools/docs/index.rst
+++ b/tools/docs/index.rst
@@ -35,52 +35,14 @@ Mozilla Source Tree Documentation
 
 .. toctree::
    :caption: Code quality
    :maxdepth: 1
 
    {code_quality_doc}
 
 
-Managing Documentation
-======================
-
-This documentation is generated via the
-`Sphinx <http://sphinx-doc.org/>`_ 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:
-
-1. Create a directory for the docs. This is typically ``docs``. e.g.
-   ``featureX/docs``.
-2. Create an ``index.rst`` file in this directory. The ``index.rst`` file
-   is the root documentation for that section. See ``build/docs/index.rst``
-   for an example file.
-3. In a ``moz.build`` file (typically the one in the parent directory of
-   the ``docs`` directory), define ``SPHINX_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``*.
-4. 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']``.
-5. In ``tools/docs/config.yml``, defines in which category the doc
-   should go.
-
-
 Indices and tables
 ==================
 
 * :ref:`genindex`
 * :ref:`modindex`
 * :ref:`search`
--- a/tools/moz.build
+++ b/tools/moz.build
@@ -60,16 +60,18 @@ with Files('lint/docs/**'):
 
 SPHINX_TREES['compare-locales'] = 'compare-locales/docs'
 
 with Files('compare-locales/docs/**'):
     SCHEDULES.exclusive = ['docs']
 
 SPHINX_TREES['try'] = 'tryselect/docs'
 
+SPHINX_TREES['docs'] = 'docs/docs'
+
 with Files('tryselect/docs/**'):
     SCHEDULES.exclusive = ['docs']
 
 CRAMTEST_MANIFESTS += [
     'tryselect/test/cram.ini',
 ]
 
 PYTHON_UNITTEST_MANIFESTS += [