doc: describe our documentation style
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 7 Apr 2023 09:28:00 +0000 (11:28 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 8 Apr 2023 05:44:33 +0000 (07:44 +0200)
Provide a reference document for the U-Boot documentation style.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
doc/develop/docstyle.rst [new file with mode: 0644]
doc/develop/index.rst

diff --git a/doc/develop/docstyle.rst b/doc/develop/docstyle.rst
new file mode 100644 (file)
index 0000000..f9ba83a
--- /dev/null
@@ -0,0 +1,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://docs.kernel.org/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`.
index a52ad63..ddbf8da 100644 (file)
@@ -11,6 +11,7 @@ General
 
    codingstyle
    designprinciples
+   docstyle
    patman
    process
    release_cycle