This document explains how to contribute to the OpenRocket documentation. It provides information on why we use Sphinx
for our documentation, how to edit and build the documentation, and the style guide for writing documentation.
..contents:: Table of Contents
:depth:2
:local:
:backlinks:none
Why Sphinx?
===========
This documentation is generated using `Sphinx <https://www.sphinx-doc.org/en/master/>`__. Sphinx is a tool that makes it
easy to create intelligent and beautiful documentation. It is used by many open-source projects, including
`Python <https://www.python.org/>`__, `NumPy <https://numpy.org/>`__, and `Matplotlib <https://matplotlib.org/>`__.
Sphinx uses `reStructuredText <https://docutils.sourceforge.io/rst.html>`__ as its markup language, which is a lightweight markup language that is easy to read and write. Sphinx also supports `Markdown <https://www.markdownguide.org/>`__ and `LaTeX <https://www.latex-project.org/>`__.
Previously, OpenRocket used MediaWiki for its documentation, but we decided to switch to Sphinx for several reasons:
- Sphinx is more powerful, modern, and flexible than MediaWiki. It allows us to create more complex and interactive documentation.
- Sphinx is easier to maintain than MediaWiki. It is easier to update and manage the documentation in the source files.
- Sphinx can give warnings and errors when building the documentation, which helps to catch mistakes and inconsistencies.
- The documentation is hosted on our GitHub repository, together with the source code. This ensures all resources are concentrated,
makes it easier to keep the documentation in sync with the code, and allows for better version control.
- Lastly, for some users who wanted to contribute to the MediaWiki documentation, their access to the MediaWiki was blocked.
We were never able to solve that issue.
Read the Docs
-------------
The OpenRocket documentation is hosted on `Read the Docs <https://readthedocs.org/>`__. Read the Docs is a popular
platform for hosting documentation for open-source projects. It automatically builds the documentation from the source
files in the OpenRocket repository and makes it available online. This makes it easy for users to access the documentation
and for contributors to update it. It also supports versioning, so you can view the documentation for different versions of
OpenRocket, and it has a search feature that allows you to quickly find what you are looking for. Additionally, you can also
add translations to the documentation, which makes it accessible to a wider audience.
Editing and Building the Documentation
======================================
If you would like to contribute to the documentation, you can do so by editing the reStructuredText files in the
:file:`docs/source` directory of the OpenRocket repo. You can then build the documentation by first