Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation guide #779

Merged
merged 4 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/environment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: fenics
name: festim-docs
channels:
- conda-forge
- defaults
Expand Down
57 changes: 57 additions & 0 deletions docs/source/devguide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,60 @@ Implementing a new feature
#. :ref:`Make your changes<contributing to the code>`

#. Write a test to test your feature


-------------------
Documentation guide
-------------------

The documentation is a crucial part of the project. It is the first thing users will see when they want to use FESTIM.
It is important to keep it up to date and clear.

The documentation is written in `reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_ and is located in the `docs folder <https://github.com/festim-dev/FESTIM/tree/main/docs>`_ at the root of the FESTIM repository.

The documentation is built using `Sphinx <https://www.sphinx-doc.org/en/master/>`_.

To build the documentation locally, you can use the following command:

.. code-block:: bash

cd docs/source
make html

This will generate the documentation in the `docs/source/_build/html` folder.
You can then open the `index.html` file in your browser to see the documentation.
RemDelaporteMathurin marked this conversation as resolved.
Show resolved Hide resolved

Alternatively, you can use the following command to build the documentation in one line:

.. code-block:: bash

cd docs
sphinx-build -b html source build

.. note::

Make sure to have the right dependencies installed. You can create a new conda environment with the following command:

.. code-block:: bash

conda env create -f docs/environment.yml

This will create a new environment called `festim-docs` with all the necessary dependencies.
Activate it using:

.. code-block:: bash

conda activate festim-docs

The documentation is hosted on `Read the Docs <https://readthedocs.org/>`_ and is automatically updated when a new commit is pushed to the repository or to a Pull Request.

.. note::

The documentation is built using the `sphinx_book_theme <https://sphinx-book-theme.readthedocs.io/en/latest/>`_ theme.

When contributing to the documentation, make sure to:

#. Write clear and concise documentation
#. Use the right syntax
#. Update the documentation when new features are added

Loading