documentation_guidelines.rst 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. .. _doc_documentation_guidelines:
  2. Documentation guidelines
  3. ========================
  4. This page describes the rules to follow if you want to contribute to Godot
  5. Engine by writing or reviewing documentation, or by translating existing
  6. documentation. Also, have a look at README of the
  7. `godot-docs GitHub repository <https://github.com/godotengine/godot-docs>`_
  8. and the `docs front page <https://docs.godotengine.org>`_
  9. on what steps to follow and how to contact the docs team.
  10. How to contribute
  11. -----------------
  12. Creating or modifying documentation pages is mainly done via the
  13. `godot-docs GitHub repository <https://github.com/godotengine/godot-docs>`_.
  14. The HTML (or PDF and EPUB) documentation is generated from the .rst files
  15. (reStructuredText markup language) in that repository. Modifying those pages
  16. in a pull request and getting it merged will trigger a rebuild of the online
  17. documentation.
  18. .. seealso:: For details on Git usage and the pull request workflow, please
  19. refer to the :ref:`doc_pr_workflow` page. Most of what it
  20. describes regarding the main godotengine/godot repository is
  21. also valid for the docs repository.
  22. .. warning:: The class reference's source files are in the `Godot engine repository
  23. <https://github.com/godotengine/godot>`_. We generate the :ref:`Godot API
  24. <doc_class_reference>` section of this documentation from them. If you want
  25. to update the description of a class, its methods, or properties, read
  26. :ref:`doc_updating_the_class_reference`.
  27. .. warning:: If you want to edit the **API reference**, please note that it
  28. should *not* be done in the godot-docs repository. Instead, you
  29. should edit the ``doc/classes/*`` XML files of Godot's
  30. main repository. These files are then later used to generate the
  31. in-editor documentation as well as the API reference of the
  32. online docs. Read more here: :ref:`doc_updating_the_class_reference`.
  33. The 'Edit on GitHub' link
  34. -------------------------
  35. If you're reading documentation on `docs.godotengine.org <https://docs.godotengine.org>`_,
  36. you'll see an **Edit on GitHub** hyperlink at the top right of the page.
  37. Once you've created a GitHub account, you can propose changes to a page you're
  38. reading as follows:
  39. 1. Click the **Edit on GitHub** button.
  40. 2. On the GitHub page you're taken to, click the pencil icon in the top-right
  41. corner near the **Raw**, **Blame** and **History** buttons. It has the tooltip
  42. "Edit the file in a fork of this project".
  43. 3. Complete all the edits you want to make for that page.
  44. 4. Summarize the changes you made in the form at the bottom of the page and
  45. click the button labelled **Propose file change** when done.
  46. 5. On the following screens, click the **Create pull request** button until you
  47. see a message like *Username wants to merge 1 commit into
  48. godotengine:master from Username:patch-6*.
  49. 6. A reviewer will evaluate your changes and incorporate them into the docs if
  50. they're acceptable. You might also be asked to make
  51. modifications to your changes before they're included.
  52. What makes good documentation?
  53. ------------------------------
  54. Documentation should be well written in plain English, using well-formed
  55. sentences and various levels of sections and subsections. It should be clear
  56. and objective. Also, have a look at the :ref:`doc_docs_writing_guidelines`.
  57. We differentiate tutorial pages from other documentation pages by these
  58. definitions:
  59. - Tutorial: a page aiming at explaining how to use one or more concepts in
  60. the editor or scripts in order to achieve a specific goal with a learning
  61. purpose (e.g. "Making a simple 2d Pong game", "Applying forces to an
  62. object").
  63. - Documentation: a page describing precisely one and only one concept at a
  64. time, if possible exhaustively (e.g. the list of methods of the
  65. Sprite class, or an overview of the input management in Godot).
  66. You are free to write the kind of documentation you wish, as long as you
  67. respect the following rules (and the ones on the repo).
  68. Titles
  69. ------
  70. Always begin pages with their title and a Sphinx reference name:
  71. ::
  72. .. _doc_insert_your_title_here:
  73. Insert your title here
  74. ======================
  75. The reference allows linking to this page using the ``:ref:`` format, e.g.
  76. ``:ref:`doc_insert_your_title_here``` would link to the above example page
  77. (note the lack of leading underscore in the reference).
  78. Also, avoid American CamelCase titles: title's first word should begin
  79. with a capitalized letter, and every following word should not. Thus,
  80. this is a good example:
  81. - Insert your title here
  82. And this is a bad example:
  83. - Insert Your Title Here
  84. Only project, people and node class names should have capitalized first
  85. letter.
  86. Translating existing pages
  87. --------------------------
  88. You can help to translate the official Godot documentation on our `Hosted Weblate <https://hosted.weblate.org/engage/godot-engine/>`_.
  89. .. image:: https://hosted.weblate.org/widgets/godot-engine/-/godot-docs/287x66-white.png
  90. :alt: Translation state
  91. :align: center
  92. :target: https://hosted.weblate.org/engage/godot-engine/?utm_source=widget
  93. :width: 287
  94. :height: 66
  95. There also is the official
  96. `Godot i18n repository <https://github.com/godotengine/godot-docs-l10n>`_
  97. where you can see when the data was last synchronized.
  98. License
  99. -------
  100. This documentation and every page it contains is published under the terms of
  101. the `Creative Commons Attribution 3.0 license (CC BY 3.0) <https://creativecommons.org/licenses/by/3.0/>`_,
  102. with attribution to "Juan Linietsky, Ariel Manzur and the Godot community".
  103. By contributing to the documentation on the GitHub repository, you agree that
  104. your changes are distributed under this license.