docstyle.rst 1.3 KB

1234567891011121314151617181920212223242526272829
  1. .. SPDX-License-Identifier: GPL-2.0+:
  2. Documentation Style
  3. ===================
  4. Documentation is crucial for the U-Boot project. It has to encompass the needs
  5. of different reader groups from first time users to developers and maintainers.
  6. This requires different types of documentation like tutorials, how-to-guides,
  7. explanatory texts, and reference.
  8. We want to be able to generate documentation in different target formats. We
  9. therefore use `Sphinx <https://www.sphinx-doc.org>`_ for the generation of
  10. documents from reStructured text.
  11. We apply the following rules:
  12. * Documentation files are located in *doc/* or its sub-directories.
  13. * Each documentation file is added to an index page to allow navigation
  14. to the document.
  15. * For documentation we use reStructured text conforming to the requirements
  16. of `Sphinx <https://www.sphinx-doc.org>`_.
  17. * For documentation within code we follow the Linux kernel guide
  18. `Writing kernel-doc comments <https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html>`_.
  19. * We try to stick to 80 columns per line in documents.
  20. * For tables we prefer simple tables over grid tables. We avoid list tables
  21. as they make the reStructured text documents hard to read.
  22. * Before submitting documentation patches we build the HTML documentation and
  23. fix all warnings. The build process is described in
  24. :doc:`/build/documentation`.