summaryrefslogtreecommitdiffstats
path: root/documentation/standards.md
diff options
context:
space:
mode:
authorMichael Opdenacker <michael.opdenacker@bootlin.com>2024-05-02 08:10:09 +0200
committerSteve Sakoman <steve@sakoman.com>2024-05-15 09:44:16 -0700
commit5c841acbab59e86b294c91e69fe543152fd54e82 (patch)
treef8ef0b767b8dad922118e1f6683a2a442d6e3916 /documentation/standards.md
parent8e81c67e12f64b42f09d7eab30e9d1633160bf87 (diff)
downloadpoky-5c841acbab59e86b294c91e69fe543152fd54e82.tar.gz
documentation: standards.md: align with master branch
(From yocto-docs rev: ecc1731d6bd2f3bce40010bbfa3b608dcf25dd04) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'documentation/standards.md')
-rw-r--r--documentation/standards.md97
1 files changed, 94 insertions, 3 deletions
diff --git a/documentation/standards.md b/documentation/standards.md
index d3b25adfab..bc403e393e 100644
--- a/documentation/standards.md
+++ b/documentation/standards.md
@@ -22,7 +22,92 @@ what Wikipedia or the project defining this word uses.
22 22
23## Text standards 23## Text standards
24 24
25This section has not been filled yet 25### Bulleted lists
26
27Though Sphinx supports both the ``*`` and ``-`` characters
28for introducing bulleted lists, we have chosen to use
29only ``-`` for this purpose.
30
31Though not strictly required by Sphinx, we have also chosen
32to use two space characters after ``-`` to introduce each
33list item:
34
35 - Paragraph 1
36
37 - Paragraph 2
38
39As shown in the above example, there should also be an empty
40line between each list item.
41
42An exception to this rule is when the list items are just made
43of a few words, instead of entire paragraphs:
44
45 - Item 1
46 - Item 2
47
48This is again a matter of style, not syntax.
49
50### Line wrapping
51
52Source code for the documentation shouldn't have lines
53wider than 80 characters. This makes patch lines more
54readable and code easier to quote in e-mail clients.
55
56If you have to include long commands or lines in configuration
57files, provided the syntax makes this possible, split them
58into multiple lines, using the ``\`` character.
59
60Here is an example:
61
62 $ scripts/install-buildtools \
63 --without-extended-buildtools \
64 --base-url https://downloads.yoctoproject.org/releases/yocto \
65 --release yocto-4.0.1 \
66 --installer-version 4.0.1
67
68Exceptions are granted for file contents whose lines
69cannot be split without infringing syntactic rules
70or reducing readability, as well as for command output
71which should be kept unmodified.
72
73### File, tool and command names
74
75File, tool, command and package names should be double tick-quoted.
76For example, ``` ``conf/local.conf`` ``` is preferred over
77`"conf/local.conf"`.
78
79### Project names
80
81Project names should be introduced with single quotes, to have them rendered
82with an italic font and make them easier to distinguish from command names
83(double tick-quoted) and from regular English words.
84
85An exception is when project names appear in hyperlinks, as nested markup
86is not supported by Sphinx yet.
87
88Project names should also be capitalized (or not) in the same way they are on
89Wikipedia, or on their own project pages if they are not described on
90Wikipedia. If a project name isn't capitalized, it should remain so even
91at the beginning of a sentence.
92
93For example:
94
95* ``` `BitBake` ```
96* ``` `ftrace` ```
97
98### Variables
99
100Every variable should be mentioned with:
101
102 :term:`VARIABLE`
103
104This assumes that `VARIABLE` is described either
105in the Yocto Project documentation variable index (`ref-manual/variables.rst`)
106or in the BitBake User Manual
107(`doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst`)
108
109If it is not described yet, the variable should be added to the
110glossary before or in the same patch it is used, so that `:term:` can be used.
26 111
27## ReStructured Text Syntax standards 112## ReStructured Text Syntax standards
28 113
@@ -41,8 +126,14 @@ To include a screenshot in PNG format:
41 .. image:: figures/user-configuration.png 126 .. image:: figures/user-configuration.png
42 :align: center 127 :align: center
43 128
44Depending on the size of the image, you may also shrink it 129A diagram with many details usually needs to use
45to prevent it from filling the whole page width: 130the whole page width to be readable on all media.
131In this case, the `:align:` directive is unnecessary:
132
133 :scale: 100%
134
135Conversely, you may also shrink some images to
136to prevent them from filling the whole page width:
46 137
47 :scale: 50% 138 :scale: 50%
48 139