Skip to content

Commit e2e7242

Browse files
authored
docs: Added documentation on how to generate docs locally (#2220)
* docs: added documentation on how to generate docs locally
1 parent 22609dd commit e2e7242

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

docs/changes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Pending
1313
class instance, regardless if any data was generated.
1414
* Fixed selenium tests for CI by using psycopg for Python 3.13 runs.
1515
* Added ``CommunityPanel`` containing links to documentation and resources.
16+
* Added how to generate the documentation locally to the contributing
17+
documentation.
1618

1719
6.0.0 (2025-07-22)
1820
------------------

docs/contributing.rst

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ You can report bugs and request features in the `bug tracker
1212

1313
Please search the existing database for duplicates before filing an issue.
1414

15+
.. _code:
16+
1517
Code
1618
----
1719

@@ -207,3 +209,60 @@ The release itself requires the following steps:
207209
#. **After the publishing completed** edit the automatically created GitHub
208210
release to include the release notes (you may use GitHub's "Generate release
209211
notes" button for this).
212+
213+
214+
Building the documentation locally
215+
----------------------------------
216+
217+
The project's documentation is built using `Sphinx <https://www.sphinx-doc.org>`_.
218+
You can generate it locally to preview your changes before submitting a pull
219+
request.
220+
221+
222+
Prerequisites
223+
--------------
224+
225+
Before building the documentation, ensure that all dependencies are installed
226+
as described in :ref:`the setup instructions <code>`.
227+
228+
229+
230+
Using Tox (Cross-Platform)
231+
------------------------------------
232+
233+
To build the documentation using Tox, run from the project root:
234+
235+
.. code-block:: bash
236+
237+
tox -e docs -- html
238+
239+
This will generate the HTML files in ``docs/_build/html/``.
240+
241+
You can then open the documentation in your browser:
242+
243+
- **Linux:** ``xdg-open docs/_build/html/index.html``
244+
- **macOS:** ``open docs/_build/html/index.html``
245+
- **Windows:** ``start docs\_build\html\index.html``
246+
247+
*Tox automatically installs the necessary dependencies, so you don’t need
248+
to activate a virtual environment manually.*
249+
250+
251+
Troubleshooting
252+
----------------
253+
254+
255+
If you encounter an error about a missing dependency such as
256+
``sphinx-build: command not found``, ensure that your virtual environment is
257+
activated and all dependencies are installed:
258+
259+
.. code-block:: bash
260+
261+
pip install -r requirements_dev.txt
262+
263+
Alternatively, you can build the documentation using Tox, which automatically
264+
handles dependencies and environment setup:
265+
266+
.. code-block:: bash
267+
268+
tox -e docs -- html

0 commit comments

Comments
 (0)