.. ====================================================================== .. © (or copyright) 2019-2026. Triad National Security, LLC. All rights .. reserved. This program was produced under U.S. Government contract .. 89233218CNA000001 for Los Alamos National Laboratory (LANL), which is .. operated by Triad National Security, LLC for the U.S. Department of .. Energy/National Nuclear Security Administration. All rights in the .. program are reserved by Triad National Security, LLC, and the .. U.S. Department of Energy/National Nuclear Security .. Administration. The Government is granted for itself and others acting .. on its behalf a nonexclusive, paid-up, irrevocable worldwide license .. in this material to reproduce, prepare derivative works, distribute .. copies to the public, perform publicly and display publicly, and to .. permit others to do so. .. ====================================================================== .. _sphinx-doc: .. _Sphinx CheatSheet: https://thomas-cokelaer.info/tutorials/sphinx/rest_syntax.html How to Use Sphinx for Writing Docs =================================== How to Get the Dependencies --------------------------- Using Docker ^^^^^^^^^^^^ If you are using `Docker`_, then simply pull the docker image specified below: .. _Docker: https://www.docker.com .. code-block:: image: sphinxdoc/sphinx-latexpdf Then, after running :code:`docker run -it /bin/bash`, install the theme we are using with :code:`pip install sphinx_rtd_theme` Using Python ^^^^^^^^^^^^ With your favorite python package manager, e.g., ``pip``, install ``sphinx``, ``spinx_multiversion``, and ``sphinx_rtd_theme``. For example: .. code-block:: pip install sphinx pip install sphinx_multiversion pip install sphinx_rtd_theme How to Build .rst into .html ---------------------------- After you have the dependencies in your environment, then simply build your documentation as the following: .. code-block:: make html from :code:`.gitlab-ci.yml` .. note:: You can view the documentation webpage locally on your web browser by passing in the URL as :code:`file:///path/to/spiner/doc/sphinx/_build/html/index.html` How to Deploy ------------- #. Submit a PR with your .rst changes for documentation on `Github Spiner`_ #. Get your PR reviewed and merged into main #. Make sure the :code:`pages` CI job passes in the CI pipeline .. _Github Spiner: https://github.com/lanl/spiner As soon as the PR is merged into main, this will trigger the Pages deployment automatically if the :code:`pages` CI job passes. Documentation is available on `github-pages`_ and on `re-git`_ .. _github-pages: https://lanl.github.io/spiner/ .. _re-git: http://xcap.re-pages.lanl.gov/oss/spiner More Info. ---------- * `Sphinx Installation`_ .. _Sphinx Installation: https://www.sphinx-doc.org/en/master/usage/installation.html * `Sphinx reStructuredText Documentation`_ .. _Sphinx reStructuredText Documentation: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html