文档规范¶
This page describes the rules to follow if you want to contribute to Godot Engine by writing or reviewing documentation, or by translating existing documentation. Also, have a look at README of the godot-docs GitHub repository and the docs front page on what steps to follow and how to contact the docs team.
如何贡献¶
Creating or modifying documentation pages is mainly done via the godot-docs GitHub repository. The HTML (or PDF and EPUB) documentation is generated from the .rst files (reStructuredText markup language) in that repository. Modifying those pages in a pull request and getting it merged will trigger a rebuild of the online documentation.
参见
有关Git用法和拉取请求工作流程的详细信息, 请参阅 拉取请求工作流程 页面. 它描述的关于主godotengine/godot仓库的大部分内容, 这对文档仓库也是有效的.
警告
The class reference's source files are in the Godot engine repository. We generate the Godot API section of this documentation from them. If you want to update the description of a class, its methods, or properties, read 为类参考手册贡献.
警告
如果你想编辑 API参考手册 , 请注意它 不 应该在godot-docs仓库中完成. 而是, 你应该编辑Godot的主仓库的 doc/classes/*
XML文件. 这些文件随后将用于生成编辑器内文档以及在线文档的API参考手册. 在这里 为类参考手册贡献 阅读更多.
“Edit on GitHub”链接¶
如果你正在阅读 docs.godotengine.org 上的文档, 你会在页面的右上方看到一个 Edit on GitHub 的超链接. 一旦你创建了GitHub账户, 你就可以对你正在阅读的页面提出修改意见, 方法如下:
点击“Edit on GitHub”按钮。
在您转到的GitHub页面上, 点击右上角靠近 Raw , Blame 和 History 按钮的铅笔图标. 它的工具提示是 "Edit the file in a fork of this project" 在这个项目的分叉中编辑文件.
完成您要对该页面进行的所有编辑.
在页面底部的表格中总结你所做的修改, 完成后点击标有 Propose file change 的按钮.
在接下来的页面上,点击 Create pull request 按钮,直到看到类似 Username wants to merge 1 commit into godotengine:master from Username:patch-6 的信息。
审核者会评估你的修改, 如果你的修改可以接受, 就把它们纳入文档. 可能还会要求您对更改进行修改, 然后再将其包括在内.
什么是良好的文档?¶
文件应该用通俗的英语写好,使用格式良好的句子和不同层次的章节和分节。它应该是清晰和客观的。另请参阅 文档编写规范。
我们通过以下定义将教程页面与其他文档页面区分开:
教程: 该页面旨在说明如何在编辑器或脚本中使用一个或多个概念, 以达到具有学习目的的特定目标(例如"制作简单的2d Pong游戏 "," 向对象施加力").
文档: 一个页面, 如果可能的话, 一次只描述一个且只有一个概念(例如Sprite类的方法列表, 或者Godot中输入管理的概述).
只要您遵守以下规则(以及储存库中的规则), 你可以自由地编写你想的那种文档.
标题¶
始终以标题和Sphinx引用名称开始页面:
.. _doc_insert_your_title_here:
Insert your title here
======================
引用允许使用 :ref:
格式链接到这个页面,例如 :ref:`doc_insert_your_title_here`
将链接到上面的例子页面(注意引用中没有前导下划线)。
另外, 避免使用美国驼峰式标题: 标题的第一个单词应以大写字母开头, 而后面的每个单词都不应该大写. 因此, 这是一个很好的示例:
Insert your title here
这是一个糟糕的示例:
Insert Your Title Here
只有项目, 人员和节点类名称应该首字母大写.
翻译现有页面¶
您可以帮助我们翻译或校对在 Hosted Weblate 上的官方 Godot 文档。

There also is the official Godot i18n repository where you can see when the data was last synchronized.
许可证¶
本文档及其包含的每个页面均根据 知识共享署名3.0许可证(CC-BY-3.0) 的条款发布, 归属于"Juan Linietsky,Ariel Manzur和Godot社区".
通过贡献GitHub仓库上的文档, 你同意你的更改是根据此许可证分发的.