Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

ドキュメントへの貢献

This guide explains how to contribute to Godot's documentation, be it by writing or reviewing pages.

参考

If you want to translate pages or the class reference from English to other languages, read Editor and documentation localization.

入門

To modify or create pages in the reference manual, you need to edit .rst files in the godot-docs GitHub repository. Modifying those pages in a pull request triggers a rebuild of the online documentation upon merging.

参考

Gitの使用状況とプル要求ワークフローの詳細については、プルリクエスト・ワークフローページを参照してください。メインの godotengine/godot リポジトリに関する記述のほとんどは、ドキュメントリポジトリにも有効です。

警告

The class reference's source files are in the Godot engine repository. We generate the Class Reference section of this documentation from them. If you want to update the description of a class, its methods, or properties, read Contributing to the class reference.

Godotドキュメントとは何ですか

Godotドキュメントは、Godotゲームエンジンの包括的なリファレンスマニュアルとして意図されています。「入門」セクションにある2つのゲーム制作チュートリアルを除き、段階的なチュートリアルとしては意図されていません。

私たちは、事実に基づいた内容を、参照しやすく分かりやすい言葉で書くよう努めています。貢献するには、以下もお読みください:

  1. Writing guidelines. There, you will find rules and recommendations to write in a way that everyone understands.

  2. Content guidelines. They explain the principles we follow to write the documentation and the kind of content we accept.

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 less convenient to edit than a wiki, this Git repository is where we write the documentation. Having direct access to the source files in a revision control system is a plus to ensure our documentation quality.

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 reference. See Contributing to the class reference for details.

参考

To build the manual and test changes on your computer, see Building the manual with Sphinx.

オンライン上でページを編集

各ページの右上にある「Edit on GitHub」をクリックすると、オンライン上でドキュメントを編集できます。

GitHub上のテキストエディタが開きます。編集するには、GitHubのアカウントが必要です。ログインしたら、次のように変更を提案できます:

  1. Edit on GitHub ボタンをクリックします。

  2. On the GitHub page you're taken to, click the pencil icon in the top-right corner near the Raw, Blame, and Delete buttons. It has the tooltip "Fork this project and edit the file".

  3. Edit the text in the text editor.

  4. At the bottom of the web page, summarize the changes you made and click the button Propose file change. Make sure to replace the placeholder "Update file.rst" by a short but clear one-line description, as this is the commit title.

  5. On the following screens, click the Create pull request button until you see a message like Username wants to merge 1 commit into godotengine:master from Username:patch-1.

Another contributor will review your changes and merge them into the docs if they're good. They may also make changes or ask you to do so before merging.

Adding new pages

Before adding a new page, please ensure that it fits in the documentation:

  1. Look for existing issues or open a new one to see if the page is necessary.

  2. Ensure there isn't a page that already covers the topic.

  3. Read our Content guidelines.

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.

You should then add your page to the relevant "toctree" (table of contents, e.g. tutorials/3d/index.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参照名でページを開始します:

.. _doc_insert_your_title_here:

Insert your title here
======================

The reference _doc_insert_your_title_here and the title should match.

The reference allows linking to this page using the :ref: format, e.g. :ref:`doc_insert_your_title_here` would link to the above example page (note the lack of leading underscore in the reference).

Write your titles like plain sentences, without capitalizing each word:

  • Good: Understanding signals in Godot

  • Bad: Understanding Signals In Godot

Only propers nouns, projects, people, and node class names should have their first letter capitalized.

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. To learn how to use Sphinx directives like .. note:: or .. seealso::, check out the Sphinx directives documentation.

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.webp

Alternatively, you can use the figure directive, which gives the image a contrasting border and allows centering it on the page.

.. figure:: img/image_name.webp
    :align: center

You can also include attachments as support material for a tutorial, by placing them into a files/ folder next to the .rst file, and using this inline markup:

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

Consider using the godot-docs-project-starters <https://github.com/godotengine/godot-docs-project-starters> repository for hosting support materials, such as project templates and asset packs. You can use a direct link to the generated archive from that repository with the regular link markup:

`file_name.zip <https://github.com/godotengine/godot-docs-project-starters/releases/download/latest-4.x/file_name.zip>`_

ライセンス

This documentation and every page it contains is published under the terms of the Creative Commons Attribution 3.0 license (CC BY 3.0), with attribution to "Juan Linietsky, Ariel Manzur and the Godot community".

GitHubリポジトリのドキュメントに投稿することで、変更がこのライセンスの下で配布されることに同意します。