Official EU-hosted mirror of the Godot Engine GitHub documentation repository, provided as backup and for anyone who cannot access GitHub due to US trade restrictions. Please only use the issue tracker if you are restricted from using GitHub.

Rémi Verschelde 7a86ac6a30 Add caution message that this is outdated documentation il y a 1 an
.github 85bc5aa296 Remove unused GitHub Actions scheduled workflow il y a 3 ans
_extensions bad5f91416 Improve GDScript lexer for Godot 3.x il y a 2 ans
_static 080029b2bc Fix the styling of the HTML shell reference (#6119) il y a 2 ans
_templates 16a3e6b695 Add a link to doc writing guidelines to the header (#5947) il y a 2 ans
_tools 599e40618f Codespell & typo fixes (#6101) il y a 2 ans
about 85f1af3820 Add VisualScript pending removal notice in Godot 4.0 il y a 2 ans
classes 81e075818e classref: Sync with current 3.4 branch (716e4e0c2) il y a 2 ans
community a780e34117 Fix grammar error in Pull request workflow (#6039) il y a 2 ans
development 2285e7cd49 Add missing vertex normal array in TSCN file format (#6068) il y a 2 ans
getting_started 4e1d722d35 Use exact name of AnimationPlayer node in Character animation (#6141) il y a 2 ans
img a9782ac9ff Cheatsheet of ease() with known names il y a 2 ans
tutorials 6ed00080a8 Fix FFmpeg filter command in Playing videos (#6151) il y a 2 ans
.editorconfig 24bc07f219 Add `.editorconfig` and `.gitattributes` files for automatic settings il y a 3 ans
.gitattributes 24bc07f219 Add `.editorconfig` and `.gitattributes` files for automatic settings il y a 3 ans
.gitignore 1361ffb70c Add _tools folder for utility scripts il y a 4 ans
.mailmap 8e9d2ba633 Add AUTHORS.md with list of main contributors il y a 4 ans
.readthedocs.yml 3411e03ed9 RTD: Migrate config file to v2 il y a 4 ans
AUTHORS.md 3272cf67e1 Fix formatting on AUTHORS.md file il y a 3 ans
LICENSE.txt 9bfc111547 Add full text of CC-BY-3.0 license il y a 6 ans
Makefile c58ed951a1 Drop LaTeX dependency via usage of sphinx.ext.imgmath in Vector Math tutorial il y a 4 ans
README.md 1ed3699ed4 Update offline documentation download URL in the README (#4935) il y a 3 ans
conf.py 7a86ac6a30 Add caution message that this is outdated documentation il y a 1 an
index.rst 7a86ac6a30 Add caution message that this is outdated documentation il y a 1 an
make.bat c60abb849e Revert "Default to parallel builds in Sphinx for faster builds" il y a 4 ans
requirements.txt 7ac694d333 Merge pull request #5933 from godotengine/dependabot/pip/sphinx-notfound-page-0.8.3 il y a 2 ans
robots.txt fd5f6f4909 Appease our great search engine overlords il y a 4 ans

README.md

Godot Engine documentation

This repository contains the source files of Godot Engine's documentation, in reStructuredText markup language (reST).

They are meant to be parsed with the Sphinx documentation builder to build the HTML documentation on Godot's website.

Download for offline use

You can download an HTML copy for offline reading (updated every Monday). Extract the ZIP archive then open the top-level index.html in a web browser.

Theming

The Godot documentation uses the default sphinx_rtd_theme with many customizations applied on top. It will automatically switch between the light and dark theme depending on your browser/OS' theming preference.

If you use Firefox and wish to use the dark theme regardless of your OS configuration, you can install the Dark Website Forcer add-on.

Contributing changes

Pull Requests should use the master branch by default. Only make Pull Requests against other branches (e.g. 2.1 or 3.0) if your changes only apply to that specific version of Godot.

Though arguably less convenient to edit than a wiki, this Git repository is meant to receive pull requests to always improve the documentation, add new pages, etc. Having direct access to the source files in a revision control system is a big plus to ensure the quality of our documentation.

Editing existing pages

To edit an existing page, locate its .rst source file and open it in your favorite text editor. You can then commit the changes, push them to your fork and make a pull request. Note that the pages in classes/ should not be edited here, they are automatically generated from Godot's XML class references. See Contribute to the Class Reference for details.

Adding new pages

To add a new page, create a .rst file with a meaningful name in the section you want to add a file to, e.g. tutorials/3d/light_baking.rst. Write its content like you would do for any other file, and make sure to define a reference name for Sphinx at the beginning of the file (check other files for the syntax), based on the file name with a "doc_" prefix (e.g. .. _doc_light_baking:).

You should then add your page to the relevant "toctree" (table of contents, e.g. tutorials/3d/index.rst). By convention, the files used to define the various levels of toctree are prefixed with an underscore, so in the above example the file should be referenced in tutorials/3d/_3d_graphics.rst. Add your new filename to the list on a new line, using a relative path and no extension, e.g. here light_baking.

Sphinx and reStructuredText syntax

Check Sphinx's reST Primer and the official reference for details on the syntax.

Sphinx uses specific reST comments to do specific operations, like defining the table of contents (:toctree:) or cross-referencing pages. Check the official Sphinx documentation for more details, or see how things are done in existing pages and adapt it to your needs.

Adding images and attachments

To add images, please put them in an img/ folder next to the .rst file with a meaningful name and include them in your page with:

.. image:: img/image_name.png

Similarly, you can include attachments (like assets as support material for a tutorial) by placing them into a files/ folder next to the .rst file, and using this inline markup:

:download:`myfilename.zip <files/myfilename.zip>`

Building with Sphinx

To build the HTML website (or any other format supported by Sphinx, like PDF, EPUB or LaTeX), you need to install Sphinx >= 1.3 as well as (for the HTML) the readthedocs.org theme. You also need to install the Sphinx extensions defined in requirements.txt.

Those tools are best installed using pip, Python's module installer. The Python 3 version might be provided (on Linux distros) as pip3 or python3-pip. You can then run:

pip install -r requirements.txt

You can then build the HTML documentation from the root folder of this repository with:

make html

or:

make SPHINXBUILD=~/.local/bin/sphinx-build html

Building the documentation requires at least 8 GB of RAM to be done without swapping. If you have at least 16 GB of RAM, you can speed up compilation by using:

# On Linux/macOS
make html SPHINXOPTS=-j2

# On Windows
set SPHINXOPTS=-j2 && make html

The compilation might take some time as the classes/ folder contains many files to parse.

In case of a MemoryError or EOFError, you can remove the classes/ folder and run make again. This will drop the class references from the final HTML documentation but will keep the rest intact. Make sure to avoid using git add . in this case when working on a pull request, or the whole classes/ folder will be removed when you make a commit. See #3157 for more details.

You can then test the changes live by opening _build/html/index.html in your favorite browser.

Building with Sphinx on Windows

On Windows, you need to:

  • Download the Python installer here.
  • Install Python. Don't forget to check the "Add Python to PATH" box.
  • Use the above pip commands.

Building is still done at the root folder of this repository using the provided make.bat:

make.bat html

Alternatively, you can build with this command instead:

sphinx-build -b html ./ _build

Note that during the first build, various installation prompts may appear and ask to install LaTeX plugins. Make sure you don't miss them, especially if they open behind other windows, else the build may appear to hang until you confirm these prompts.

You could also install a normal make toolchain (for example via MinGW) and build the docs using the normal make html.

Building with Sphinx and virtualenv

If you want your Sphinx installation scoped to the project, you can install it using virtualenv. Execute this from the root folder of this repository:

virtualenv --system-site-packages env/
. env/bin/activate
pip install -r requirements.txt

Then do make html like above.

License

At the exception of the classes/ folder, all the content of this repository is licensed under the Creative Commons Attribution 3.0 Unported license (CC BY 3.0) and is to be attributed to "Juan Linietsky, Ariel Manzur and the Godot community". See LICENSE.txt for details.

The files in the classes/ folder are derived from Godot's main source repository and are distributed under the MIT license, with the same authors as above.