2019-12-28 12:26:43 +03:00
.. _document:
Document
=========
This project uses Sphinx_ documentation generator.
2020-04-24 17:23:41 +03:00
After you have set up to `develop locally`_ , run the following command from the project directory to build and serve HTML documentation: ::
$ make -C docs livehtml
2019-12-28 12:26:43 +03:00
If you set up your project to `develop locally with docker`_ , run the following command: ::
2020-04-24 17:23:41 +03:00
$ docker-compose -f local.yml up docs
2022-02-13 15:49:05 +03:00
Navigate to port 9000 on your host to see the documentation. This will be opened automatically at `localhost`_ for local, non-docker development.
2019-12-28 12:26:43 +03:00
2020-11-04 20:17:02 +03:00
Note: using Docker for documentation sets up a temporary SQLite file by setting the environment variable `` DATABASE_URL=sqlite:///readthedocs.db `` in `` docs/conf.py `` to avoid a dependency on PostgreSQL.
2019-12-28 12:26:43 +03:00
Generate API documentation
----------------------------
2020-11-04 20:17:02 +03:00
Edit the `` docs `` files and project application docstrings to create your documentation.
2019-12-28 12:26:43 +03:00
2020-11-04 20:17:02 +03:00
Sphinx can automatically include class and function signatures and docstrings in generated documentation.
2020-04-24 17:23:41 +03:00
See the generated project documentation for more examples.
2019-12-28 12:26:43 +03:00
2020-11-04 20:17:02 +03:00
Setting up ReadTheDocs
----------------------
To setup your documentation on `ReadTheDocs`_ , you must
1. Go to `ReadTheDocs`_ and login/create an account
2. Add your GitHub repository
3. Trigger a build
Additionally, you can auto-build Pull Request previews, but `you must enable it`_ .
2022-02-13 15:49:05 +03:00
.. _localhost: http://localhost:9000/
2019-12-28 12:26:43 +03:00
.. _Sphinx: https://www.sphinx-doc.org/en/master/index.html
2020-01-23 21:39:38 +03:00
.. _develop locally: ./developing-locally.html
.. _develop locally with docker: ./developing-locally-docker.html
2020-11-04 20:17:02 +03:00
.. _ReadTheDocs: https://readthedocs.org/
.. _you must enable it: https://docs.readthedocs.io/en/latest/guides/autobuild-docs-for-pull-requests.html#autobuild-documentation-for-pull-requests