Skip to content

Commit

Permalink
Merge pull request #576 from danieldouglas92/generate_manual_doc
Browse files Browse the repository at this point in the history
Add documentation for generating documentation locally
  • Loading branch information
MFraters authored Feb 14, 2024
2 parents 4999bdc + 7206690 commit 597cfa7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
(part:dev_manual:chap:contribute_to_doc:sec:building_doc)=
Building documentation
=========================

To build the documentation locally, you first need to ensure you have the right Python packages installed. The list of packages required to build the documentation is located in `$WORLD_BUILDER_SOURCE_DIR/doc/requirements.txt`, and can be installed using

:::{code-block}
pip install -r $WORLD_BUILDER_SOURCE_DIR/doc/requirements.txt
:::

Now that the Python packages are installed, we need to toggle the option in cmake to build the target for the GWB documention, this can be done using the interactive GUI `ccmake` and enabling `WB_BUILD_DOCUMENTATION` or by running the following command:

:::{code-block}
cd $WORLD_BUILDER_SOURCE_DIR/build \\
cmake -D WB_BUILD_DOCUMENTATION=ON .
:::

This adds the target for the documentation in `$WORLD_BUILDER_SOURCE_DIR/build/doc`, to finish building the documentation run the final commands:

:::{code-block}
cd $WORLD_BUILDER_SOURCE_DIR/build/doc \\
make manual
:::

This compiles the sphinx documentation, which will be built in `$WORLD_BUILDER_SOURCE_DIR/build/doc/sphinx`.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ The documentation is very important and it is also a good way to learn git and t
```{toctree}
:hidden:
building_documentation
important_syntax
documentation_style_guide
documentation_testing
Expand Down

0 comments on commit 597cfa7

Please sign in to comment.