1.. SPDX-License-Identifier: GPL-2.0+:
2
3Documentation Style
4===================
5
6Documentation is crucial for the U-Boot project. It has to encompass the needs
7of different reader groups from first time users to developers and maintainers.
8This requires different types of documentation like tutorials, how-to-guides,
9explanatory texts, and reference.
10
11We want to be able to generate documentation in different target formats. We
12therefore use `Sphinx <https://www.sphinx-doc.org>`_ for the generation of
13documents from reStructured text.
14
15We 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
23  `Writing kernel-doc comments <https://docs.kernel.org/doc-guide/kernel-doc.html>`_.
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`.
30