documentation_guidelines.rst 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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.
  7. How to contribute
  8. -----------------
  9. Creating or modifying documentation pages is mainly done via the
  10. `godot-docs GitHub repository <https://github.com/godotengine/godot-docs>`_.
  11. The HTML (or PDF and EPUB) documentation is generated from the .rst files
  12. (reStructuredText markup language) in that repository. Modifying those pages
  13. in a pull request and getting it merged will trigger a rebuild of the online
  14. documentation.
  15. .. seealso:: For details on Git usage and the pull request workflow, please
  16. refer to the :ref:`doc_pr_workflow` page. Most of what it
  17. describes regarding the main godotengine/godot repository is
  18. also valid for the docs repository.
  19. The README.md file contains all the information you need to get you started,
  20. please read it. In particular, it contains some tips and tricks and links to
  21. reference documentation about the reStructuredText markup language.
  22. .. warning:: If you want to edit the **API reference**, please note that it
  23. should *not* be done in the godot-docs repository. Instead, you
  24. should edit the ``doc/classes/*`` XML files of Godot's
  25. main repository. These files are then later used to generate the
  26. in-editor documentation as well as the API reference of the
  27. online docs.
  28. What makes good documentation?
  29. ------------------------------
  30. Documentation should be well written in plain English, using well-formed
  31. sentences and various levels of sections and subsections. It should be clear
  32. and objective.
  33. We differentiate tutorial pages from other documentation pages by these
  34. definitions:
  35. - Tutorial: a page aiming at explaining how to use one or more concepts in
  36. the editor or scripts in order to achieve a specific goal with a learning
  37. purpose (e.g. "Making a simple 2d Pong game", "Applying forces to an
  38. object").
  39. - Documentation: a page describing precisely one and only one concept at a
  40. time, if possible exhaustively (e.g. the list of methods of the
  41. Sprite class, or an overview of the input management in Godot).
  42. You are free to write the kind of documentation you wish, as long as you
  43. respect the following rules (and the ones on the repo). In particular, you
  44. can contribute tutorials in the "Community" section of the docs, where they
  45. could be merged relatively easily, improved by other contributors and
  46. eventually moved to an "official" section if relevant.
  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. For the moment, only English documentation is provided. We want to propose
  68. localized documentation in the future, but this is not a priority for now.
  69. Indeed, since the English documentation is still evolving a lot as the
  70. community improves it and make it more professional, we prefer that
  71. translators do not spend too much time on it, as their translated
  72. documentation might quickly grow out of sync with the original.
  73. When the English documentation is ready for translations, we will provide
  74. tools to simplify the work of translators by tracking changes to the English
  75. docs that they should translate on their end.
  76. Licence
  77. -------
  78. This documentation and every page it contains is published under the terms of
  79. the Creative Commons Attribution 3.0 license (CC-BY-3.0), with attribution to
  80. "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.