2021-05-25 03:56:22 -05:00
|
|
|
.. _tutorial:
|
|
|
|
|
|
|
|
===============
|
|
|
|
Sphinx tutorial
|
|
|
|
===============
|
|
|
|
|
2021-06-06 10:19:39 -05:00
|
|
|
In this tutorial you will build a simple documentation project using Sphinx, and
|
|
|
|
view it in your browser as HTML. The project will include narrative,
|
|
|
|
handwritten documentation, as well as autogenerated API documentation.
|
|
|
|
|
|
|
|
The tutorial is aimed towards Sphinx newcomers willing to learn the fundamentals
|
|
|
|
of how projects are created and structured. You will create a fictional
|
|
|
|
software library to generate random food recipes that will serve as a guide
|
|
|
|
throughout the process, with the objective of properly documenting it.
|
|
|
|
|
|
|
|
To showcase Sphinx capabilities for code documentation you will use Python,
|
2021-05-29 06:44:26 -05:00
|
|
|
which also supports *automatic* documentation generation.
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
2021-06-06 10:19:39 -05:00
|
|
|
Several other languages are natively supported in Sphinx for *manual* code
|
|
|
|
documentation, however they require extensions for *automatic* code
|
|
|
|
documentation, like `Breathe <https://breathe.readthedocs.io/>`_.
|
2021-05-25 03:56:22 -05:00
|
|
|
|
2021-06-06 10:19:39 -05:00
|
|
|
To follow the instructions you will need access to a Linux-like command line and
|
|
|
|
a basic understanding of how it works, as well as a working Python installation
|
|
|
|
for development, since you will use *Python virtual environments* to create the
|
|
|
|
project.
|
2021-05-26 13:58:57 -05:00
|
|
|
|
2021-08-09 07:02:31 -05:00
|
|
|
.. toctree::
|
2021-05-26 13:58:57 -05:00
|
|
|
|
2021-08-09 07:02:31 -05:00
|
|
|
getting-started
|
|
|
|
first-steps
|
|
|
|
more-sphinx-customization
|
|
|
|
narrative-documentation
|
2021-08-09 07:59:15 -05:00
|
|
|
describing-code
|
2021-08-11 10:54:03 -05:00
|
|
|
automatic-doc-generation
|
2021-08-09 07:02:31 -05:00
|
|
|
end
|