This project uses Sphinx for documentation, written in reStructuredText (.rst
) and Markdown (.md
) files.
To build or extend the docs:
# 1. Install dependencies (e.g. inside a virtual environment)
pip install -r docs/source/requirements.txt
# 2. Navigate to the docs directory
cd docs/
# 3. Build HTML docs
make html
# Output will be in: docs/_build/html/index.html
sphinx-apidoc -o docs/source/<output_path> jaxtari <module to document>
- All
.rst
files live in thedocs/
folder. - The main entry point is
index.rst
, which includes other pages via thetoctree
directive. - To add a new doc page:
- Create a new
mypage.rst
. - Link it in
index.rst
under.. toctree::
.
- Create a new
You can make the docs more engaging and structured with these tools:
Create two-column layouts or style blocks:
.. container:: twocol
.. container:: leftside
Your text here...
.. container:: rightside
|img|
.. |img| image:: _static/example.png
:width: 200
:alt: Example image
.. image:: _static/diagram.png
:width: 400
:alt: Architecture diagram
Always put image files in the _static directory.
.. code-block:: python
def hello():
print("Hello, Sphinx!")
See :ref:`usage-guide` for more info.
- Follow the structure in existing
.rst
files. - Preview your changes with
make html
. - Submit a pull request!