documentation_guidelines.rst 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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 <http://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. The README.md file contains all the information you need to get you started,
  23. please read it. In particular, it contains some tips and tricks and links to
  24. reference documentation about the reStructuredText markup language.
  25. .. warning:: If you want to edit the **API reference**, please note that it
  26. should *not* be done in the godot-docs repository. Instead, you
  27. should edit the ``doc/classes/*`` XML files of Godot's
  28. main repository. These files are then later used to generate the
  29. in-editor documentation as well as the API reference of the
  30. online docs. Read more here: :ref:`doc_updating_the_class_reference`.
  31. What makes good documentation?
  32. ------------------------------
  33. Documentation should be well written in plain English, using well-formed
  34. sentences and various levels of sections and subsections. It should be clear
  35. and objective. Also have a look at the :ref:`doc_docs_writing_guidelines`.
  36. We differentiate tutorial pages from other documentation pages by these
  37. definitions:
  38. - Tutorial: a page aiming at explaining how to use one or more concepts in
  39. the editor or scripts in order to achieve a specific goal with a learning
  40. purpose (e.g. "Making a simple 2d Pong game", "Applying forces to an
  41. object").
  42. - Documentation: a page describing precisely one and only one concept at a
  43. time, if possible exhaustively (e.g. the list of methods of the
  44. Sprite class, or an overview of the input management in Godot).
  45. You are free to write the kind of documentation you wish, as long as you
  46. respect the following rules (and the ones on the repo).
  47. Titles
  48. ------
  49. Always begin pages with their title and a Sphinx reference name:
  50. ::
  51. .. _doc_insert_your_title_here:
  52. Insert your title here
  53. ======================
  54. The reference allows to link to this page using the ``:ref:`` format, e.g.
  55. ``:ref:`doc_insert_your_title_here``` would link to the above example page
  56. (note the lack of leading underscore in the reference).
  57. Also, avoid American CamelCase titles: title's first word should begin
  58. with a capitalized letter, and every following word should not. Thus,
  59. this is a good example:
  60. - Insert your title here
  61. And this is a bad example:
  62. - Insert Your Title Here
  63. Only project, people and node class names should have capitalized first
  64. letter.
  65. Translating existing pages
  66. --------------------------
  67. You can help to translate the official Godot documentation on our `Hosted Weblate <https://hosted.weblate.org/engage/godot-engine/>`_.
  68. .. image:: https://hosted.weblate.org/widgets/godot-engine/-/godot-docs/287x66-white.png
  69. :alt: Translation state
  70. :align: center
  71. :target: https://hosted.weblate.org/engage/godot-engine/?utm_source=widget
  72. :width: 287
  73. :height: 66
  74. There also is the official
  75. `Godot i18n repository <https://github.com/godotengine/godot-docs-l10n>`_
  76. where you can see when the data was last synchronized.
  77. License
  78. -------
  79. This documentation and every page it contains is published under the terms of
  80. the `Creative Commons Attribution 3.0 license (CC-BY-3.0) <https://tldrlegal.com/license/creative-commons-attribution-(cc)>`_, with attribution to "Juan Linietsky, Ariel Manzur and the Godot community".
  81. By contributing to the documentation on the GitHub repository, you agree that
  82. your changes are distributed under this license.