diff options
Diffstat (limited to 'documentation/standards.md')
-rw-r--r-- | documentation/standards.md | 61 |
1 files changed, 44 insertions, 17 deletions
diff --git a/documentation/standards.md b/documentation/standards.md index e0c0cba83c..801efe3457 100644 --- a/documentation/standards.md +++ b/documentation/standards.md | |||
@@ -1,6 +1,6 @@ | |||
1 | # Standards for contributing to Yocto Project documentation | 1 | # Standards for contributing to Yocto Project documentation |
2 | 2 | ||
3 | This document attemps to standardize the way the Yocto Project | 3 | This document attempts to standardize the way the Yocto Project |
4 | documentation is created. | 4 | documentation is created. |
5 | 5 | ||
6 | It is currently a work in progress. | 6 | It is currently a work in progress. |
@@ -70,27 +70,30 @@ cannot be split without infringing syntactic rules | |||
70 | or reducing readability, as well as for command output | 70 | or reducing readability, as well as for command output |
71 | which should be kept unmodified. | 71 | which should be kept unmodified. |
72 | 72 | ||
73 | ### Project names | 73 | ### File, tool and command names |
74 | 74 | ||
75 | Project names should be capitalized in the same | 75 | File, tool, command and package names should be double tick-quoted. |
76 | way they are on Wikipedia, in particular: | 76 | For example, ``` ``conf/local.conf`` ``` is preferred over |
77 | `"conf/local.conf"`. | ||
77 | 78 | ||
78 | * BitBake | 79 | ### Project names |
79 | * OpenEmbedded | ||
80 | 80 | ||
81 | There are exceptions in which such names can be used | 81 | Project names should be introduced with single quotes, to have them rendered |
82 | in lower case: | 82 | with an italic font and make them easier to distinguish from command names |
83 | (double tick-quoted) and from regular English words. | ||
83 | 84 | ||
84 | * When referring to a package name | 85 | An exception is when project names appear in hyperlinks, as nested markup |
85 | * When referring to the corresponding command name | 86 | is not supported by Sphinx yet. |
86 | * When used in a cross-reference title. Such | ||
87 | titles are usually in lower case. | ||
88 | 87 | ||
89 | ### File, tool and command names | 88 | Project names should also be capitalized (or not) in the same way they are on |
89 | Wikipedia, or on their own project pages if they are not described on | ||
90 | Wikipedia. If a project name isn't capitalized, it should remain so even | ||
91 | at the beginning of a sentence. | ||
90 | 92 | ||
91 | File, tool and command names should be double tick-quoted. | 93 | For example: |
92 | For example, ``` ``conf/local.conf`` ``` is preferred over | 94 | |
93 | `"conf/local.conf"`. | 95 | * ``` `BitBake` ``` |
96 | * ``` `ftrace` ``` | ||
94 | 97 | ||
95 | ### Variables | 98 | ### Variables |
96 | 99 | ||
@@ -106,9 +109,33 @@ or in the BitBake User Manual | |||
106 | If it is not described yet, the variable should be added to the | 109 | If it is not described yet, the variable should be added to the |
107 | glossary before or in the same patch it is used, so that `:term:` can be used. | 110 | glossary before or in the same patch it is used, so that `:term:` can be used. |
108 | 111 | ||
112 | ### Admonitions | ||
113 | |||
114 | Sphinx has predefined admonitions that can be used to highlight a bit of text or | ||
115 | add a side-note to the documentation. For example: | ||
116 | |||
117 | ```rst | ||
118 | .. note:: | ||
119 | |||
120 | This is a note admonition. | ||
121 | ``` | ||
122 | |||
123 | We try to limit our usage of these admonitions to `note` and `warning`, as the | ||
124 | Sphinx documentation [warns](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#directives) | ||
125 | that most themes only style these two admonitions. | ||
126 | |||
109 | ## ReStructured Text Syntax standards | 127 | ## ReStructured Text Syntax standards |
110 | 128 | ||
111 | This section has not been filled yet | 129 | ### doc directive |
130 | |||
131 | The [doc directive](https://www.sphinx-doc.org/en/master/usage/referencing.html#role-doc) | ||
132 | allows to refer to another document within yocto-docs, like: | ||
133 | |||
134 | For more information, read :doc:`/bsp-guide/index`. | ||
135 | |||
136 | Note that only "absolute" paths (starting with a '/') are allowed. The root | ||
137 | directory of that path is documentation/, that is, :doc:`/bsp-guide/index` | ||
138 | points at documentation/bsp-guide/index.rst. | ||
112 | 139 | ||
113 | ## Adding screenshots | 140 | ## Adding screenshots |
114 | 141 | ||