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