Skip to content

Commit

Permalink
Update "Building documentation locally"
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Oct 1, 2020
1 parent cb99bbd commit 96fa044
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions docs/general/documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,36 @@ Shell examples
Documentation and examples for external users should use ``sh`` or ``bash``. Documentation for internal users can use ``fish``.

Building documentation locally
--------------------------------
------------------------------

With Python 3 as your default interpreter, first install sphinx:
With Python 3 as your default interpreter, install Python modules:

.. code-block:: bash
pip install sphinx
pip install sphinx sphinx_rtd_theme
Then build the HTML pages:
Build the HTML pages:

.. code-block:: bash
sphinx-build docs build
sphinx-build docs docs/_build/html
Run a web-server:
Run a web server:

.. code-block:: bash
python -m http.server 8000
python -m http.server 8000
Open http://localhost:8000/build/ in your web browser.
Open http://localhost:8000/docs/_build/html/ in your web browser:

.. code-block:: bash
open http://localhost:8000/docs/_build/html/
.. note::

If you are using Python 3.7 or greater, you can pass ``-d docs/_build/html`` to the ``python`` command, and open http://localhost:8000/.

.. note::

Documentation is built in ``docs/_build/html``, to match the location when building with ``make html`` from the ``docs/`` directory.

0 comments on commit 96fa044

Please sign in to comment.