Building the manual with Sphinx

    To get started, you need to:

    1. Clone the godot-docs repository.

    2. Install

    3. To build the docs as HTML files, install the readthedocs.org theme.

    We recommend using , Python’s package manager to install all these tools. It comes pre-installed with Python. Ensure that you install and use Python 3. Here are the commands to clone the repository and then install all requirements.

    You may need to write python3 -m pip (Unix) or py -m pip (Windows) instead of pip3. If both approaches fail, .

    With the programs installed, you can build the HTML documentation from the root folder of this repository with the following command:

    1. # On Linux and macOS
    2. make html
    3. # On Windows, you need to execute the ``make.bat`` file instead.

    If you run into errors, you may try the following command:

    Building the documentation requires at least 8 GB of RAM to run without disk swapping, which slows it down. If you have at least 16 GB of RAM, you can speed up compilation by running:

    1. # On Linux/macOS
    2. make html SPHINXOPTS=-j2
    3. # On Windows

    The compilation will take some time as the classes/ folder contains hundreds of files.

    You can then browse the documentation by opening _build/html/index.html in your web browser.

    Note

    If you delete the classes/ folder, do not use git add . when working on a pull request or the whole classes/ folder will be removed when you commit. See #3157 for more detail.

    Alternatively, you can build the documentation by running the sphinx-build program manually:

    You can also specify a list of files to build, which can greatly speed up compilation:

    1. sphinx-build -b html ./ _build classes/class_node.rst classes/class_resource.rst

    If you want your Sphinx installation scoped to the project, you can install sphinx-build using virtualenv. To do so, run this command from this repository’s root folder:

    Then, run as shown above.