summaryrefslogtreecommitdiff
path: root/doc/develop/docstyle.rst
blob: 50506d685746a77e84d3ec86c040b105926f49ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.. SPDX-License-Identifier: GPL-2.0+:

Documentation Style
===================

Documentation is crucial for the U-Boot project. It has to encompass the needs
of different reader groups from first time users to developers and maintainers.
This requires different types of documentation like tutorials, how-to-guides,
explanatory texts, and reference.

We want to be able to generate documentation in different target formats. We
therefore use `Sphinx <https://www.sphinx-doc.org>`_ for the generation of
documents from reStructured text.

We apply the following rules:

* Documentation files are located in *doc/* or its sub-directories.
* Each documentation file is added to an index page to allow navigation
  to the document.
* For documentation we use reStructured text conforming to the requirements
  of `Sphinx <https://www.sphinx-doc.org>`_.
* For documentation within code we follow the Linux kernel guide
  `Writing kernel-doc comments <https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html>`_.
* We try to stick to 80 columns per line in documents.
* For tables we prefer simple tables over grid tables. We avoid list tables
  as they make the reStructured text documents hard to read.
* Before submitting documentation patches we build the HTML documentation and
  fix all warnings. The build process is described in
  :doc:`/build/documentation`.