summaryrefslogtreecommitdiffstats
path: root/documentation/README
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/README')
-rw-r--r--documentation/README180
1 files changed, 132 insertions, 48 deletions
diff --git a/documentation/README b/documentation/README
index be03bb119a..b60472fcbf 100644
--- a/documentation/README
+++ b/documentation/README
@@ -32,28 +32,25 @@ these instances.
32Manual Organization 32Manual Organization
33=================== 33===================
34 34
35Folders exist for individual manuals as follows: 35Here the folders corresponding to individual manuals:
36 36
37* sdk-manual - The Yocto Project Software Development Kit (SDK) Developer's Guide. 37* brief-yoctoprojectqs - Yocto Project Quick Start
38* bsp-guide - The Yocto Project Board Support Package (BSP) Developer's Guide 38* overview-manual - Yocto Project Overview and Concepts Manual
39* dev-manual - The Yocto Project Development Tasks Manual 39* contributor-guide - Yocto Project and OpenEmbedded Contributor Guide
40* kernel-dev - The Yocto Project Linux Kernel Development Tasks Manual 40* ref-manual - Yocto Project Reference Manual
41* ref-manual - The Yocto Project Reference Manual 41* bsp-guide - Yocto Project Board Support Package (BSP) Developer's Guide
42* brief-yoctoprojectqs - The Yocto Project Quick Start 42* dev-manual - Yocto Project Development Tasks Manual
43* profile-manual - The Yocto Project Profile and Tracing Manual 43* kernel-dev - Yocto Project Linux Kernel Development Manual
44* toaster-manual - The Toaster Manual 44* profile-manual - Yocto Project Profiling and Tracing Manual
45* test-manual - The Test Environment Manual 45* sdk-manual - Yocto Project Software Development Kit (SDK) Developer's Guide.
46* toaster-manual - Toaster User Manual
47* test-manual - Yocto Project Test Environment Manual
48* migration-guides - Yocto Project Release and Migration Notes
46 49
47Each folder is self-contained regarding content and figures. 50Each folder is self-contained regarding content and figures.
48 51
49If you want to find HTML versions of the Yocto Project manuals on the web, 52If you want to find HTML versions of the Yocto Project manuals on the web,
50go to https://www.yoctoproject.org and click on the "Documentation" tab. From 53the current versions reside at https://docs.yoctoproject.org.
51there you have access to archived documentation from previous releases, current
52documentation for the latest release, and "Docs in Progress" for the release
53currently being developed.
54
55In general, the Yocto Project site (https://www.yoctoproject.org) is a great
56reference for both information and downloads.
57 54
58poky.yaml 55poky.yaml
59========= 56=========
@@ -61,9 +58,16 @@ poky.yaml
61This file defines variables used for documentation production. The variables 58This file defines variables used for documentation production. The variables
62are used to define release pathnames, URLs for the published manuals, etc. 59are used to define release pathnames, URLs for the published manuals, etc.
63 60
64template 61standards.md
65======== 62============
66Contains various templates, fonts, and some old PNG files. 63
64This file specifies some rules to follow when contributing to the documentation.
65
66template/
67=========
68
69Contains a template.svg, to make it easier to create consistent
70SVG diagrams.
67 71
68Sphinx 72Sphinx
69====== 73======
@@ -88,16 +92,16 @@ documentation.
88Yocto Project documentation website 92Yocto Project documentation website
89=================================== 93===================================
90 94
91A new website has been created to host the Yocto Project 95The website hosting the Yocto Project documentation, can be found
92documentation, it can be found at: https://docs.yoctoproject.org/. 96at: https://docs.yoctoproject.org/.
93 97
94The entire Yocto Project documentation, as well as the BitBake manual 98The entire Yocto Project documentation, as well as the BitBake manual,
95is published on this website, including all previously released 99is published on this website, including all previously released
96versions. A version switcher was added, as a drop-down menu on the top 100versions. A version switcher was added, as a drop-down menu on the top
97of the page to switch back and forth between the various versions of 101of the page to switch back and forth between the various versions of
98the current active Yocto Project releases. 102the current active Yocto Project releases.
99 103
100Transition pages have been added (as rst file) to show links to old 104Transition pages have been added (as rst files) to show links to old
101versions of the Yocto Project documentation with links to each manual 105versions of the Yocto Project documentation with links to each manual
102generated with DocBook. 106generated with DocBook.
103 107
@@ -109,15 +113,28 @@ obvious reasons, we will only support building the Yocto Project
109documentation with Python3. 113documentation with Python3.
110 114
111Sphinx might be available in your Linux distro packages repositories, 115Sphinx might be available in your Linux distro packages repositories,
112however it is not recommend using distro packages, as they might be 116however it is not recommended to use distro packages, as they might be
113old versions, especially if you are using an LTS version of your 117old versions, especially if you are using an LTS version of your
114distro. The recommended method to install Sphinx and all required 118distro. The recommended method to install the latest versions of Sphinx
115dependencies is to use the Python Package Index (pip). 119and of its required dependencies is to use the Python Package Index (pip).
116 120
117To install all required packages run: 121To install all required packages run:
118 122
119 $ pip3 install sphinx sphinx_rtd_theme pyyaml 123 $ pip3 install sphinx sphinx_rtd_theme pyyaml
120 124
125To make sure you always have the latest versions of such packages, you
126should regularly run the same command with an added "--upgrade" option:
127
128 $ pip3 install --upgrade sphinx sphinx_rtd_theme pyyaml
129
130Also install the "inkscape" package from your distribution.
131Inkscape is need to convert SVG graphics to PNG (for EPUB
132export) and to PDF (for PDF export).
133
134Additionally install "fncychap.sty" TeX font if you want to build PDFs. Debian
135and Ubuntu have it in "texlive-latex-extra" package while RedHat distributions
136and OpenSUSE have it in "texlive-fncychap" package for example.
137
121To build the documentation locally, run: 138To build the documentation locally, run:
122 139
123 $ cd documentation 140 $ cd documentation
@@ -134,6 +151,34 @@ dependencies in a virtual environment:
134 $ pipenv install 151 $ pipenv install
135 $ pipenv run make html 152 $ pipenv run make html
136 153
154Style checking the Yocto Project documentation
155==============================================
156
157The project is starting to use Vale (https://vale.sh/)
158to validate the text style.
159
160To install Vale:
161
162 $ pip install vale
163
164To run Vale:
165
166 $ make stylecheck
167
168Link checking the Yocto Project documentation
169=============================================
170
171To fix errors which are not reported by Sphinx itself,
172the project uses sphinx-lint (https://github.com/sphinx-contrib/sphinx-lint).
173
174To install sphinx-lint:
175
176 $ pip install sphinx-lint
177
178To run sphinx-lint:
179
180 $ make sphinx-lint
181
137Sphinx theme and CSS customization 182Sphinx theme and CSS customization
138================================== 183==================================
139 184
@@ -164,17 +209,18 @@ The layout of the Yocto Project manuals is organized as follows
164 Book 209 Book
165 Chapter 210 Chapter
166 Section 211 Section
167 Section 212 Subsection
168 Section 213 Subsubsection
214 Subsubsubsection
169 215
170The following headings styles are defined in Sphinx: 216Here are the heading styles that we use in the manuals:
171 217
172 Book => overline === 218 Book => overline ===
173 Chapter => overline *** 219 Chapter => overline ***
174 Section => ==== 220 Section => ====
175 Section => ---- 221 Subsection => ----
176 Section => ^^^^ 222 Subsubsection => ~~~~
177 Section => """" or ~~~~ 223 Subsubsubsection => ^^^^
178 224
179With this proposal, we preserve the same TOCs between Sphinx and Docbook. 225With this proposal, we preserve the same TOCs between Sphinx and Docbook.
180 226
@@ -185,7 +231,7 @@ Sphinx has a glossary directive. From
185https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#glossary: 231https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#glossary:
186 232
187 This directive must contain a reST definition list with terms and 233 This directive must contain a reST definition list with terms and
188 definitions. The definitions will then be referencable with the 234 definitions. It's then possible to refer to each definition through the
189 [https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-term 235 [https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-term
190 'term' role]. 236 'term' role].
191 237
@@ -206,7 +252,7 @@ however there are important shortcomings. For example they cannot be
206used/nested inside code-block sections. 252used/nested inside code-block sections.
207 253
208A Sphinx extension was implemented to support variable substitutions 254A Sphinx extension was implemented to support variable substitutions
209to mimic the DocBook based documentation behavior. Variabes 255to mimic the DocBook based documentation behavior. Variable
210substitutions are done while reading/parsing the .rst files. The 256substitutions are done while reading/parsing the .rst files. The
211pattern for variables substitutions is the same as with DocBook, 257pattern for variables substitutions is the same as with DocBook,
212e.g. `&VAR;`. 258e.g. `&VAR;`.
@@ -222,7 +268,7 @@ For example, the following .rst content will produce the 'expected'
222content: 268content:
223 269
224 .. code-block:: 270 .. code-block::
225 $ mkdir ~/poky-&DISTRO; 271 $ mkdir poky-&DISTRO;
226 or 272 or
227 $ git clone &YOCTO_GIT_URL;/git/poky -b &DISTRO_NAME_NO_CAP; 273 $ git clone &YOCTO_GIT_URL;/git/poky -b &DISTRO_NAME_NO_CAP;
228 274
@@ -237,14 +283,14 @@ Note directive
237Sphinx has a builtin 'note' directive that produces clean Note section 283Sphinx has a builtin 'note' directive that produces clean Note section
238in the output file. There are various types of directives such as 284in the output file. There are various types of directives such as
239"attention", "caution", "danger", "error", "hint", "important", "tip", 285"attention", "caution", "danger", "error", "hint", "important", "tip",
240"warning", "admonition" that are supported, and additional directive 286"warning", "admonition" that are supported, and additional directives
241can be added as Sphinx extension if needed. 287can be added as Sphinx extension if needed.
242 288
243Figures 289Figures
244======= 290=======
245 291
246The Yocto Project documentation has many figures/images. Sphinx has a 292The Yocto Project documentation has many figures/images. Sphinx has a
247'figure' directive which is straight forward to use. To include a 293'figure' directive which is straightforward to use. To include a
248figure in the body of the documentation: 294figure in the body of the documentation:
249 295
250 .. image:: figures/YP-flow-diagram.png 296 .. image:: figures/YP-flow-diagram.png
@@ -259,10 +305,26 @@ websites.
259More information can be found here: 305More information can be found here:
260https://sublime-and-sphinx-guide.readthedocs.io/en/latest/references.html. 306https://sublime-and-sphinx-guide.readthedocs.io/en/latest/references.html.
261 307
308For external links, we use this syntax:
309`link text <link URL>`__
310
311instead of:
312`link text <link URL>`_
313
314Both syntaxes work, but the latter also creates a "link text" reference
315target which could conflict with other references with the same name.
316So, only use this variant when you wish to make multiple references
317to this link, reusing only the target name.
318
319See https://stackoverflow.com/questions/27420317/restructured-text-rst-http-links-underscore-vs-use
320
321Anchor (<#link>) links are forbidden as they are not checked by Sphinx during
322the build and may be broken without knowing about it.
323
262References 324References
263========== 325==========
264 326
265The following extension is enabed by default: 327The following extension is enabled by default:
266sphinx.ext.autosectionlabel 328sphinx.ext.autosectionlabel
267(https://www.sphinx-doc.org/en/master/usage/extensions/autosectionlabel.html). 329(https://www.sphinx-doc.org/en/master/usage/extensions/autosectionlabel.html).
268 330
@@ -271,7 +333,7 @@ autosectionlabel_prefix_document is enabled by default, so that we can
271insert references from any document. 333insert references from any document.
272 334
273For example, to insert an HTML link to a section from 335For example, to insert an HTML link to a section from
274documentaion/manual/intro.rst, use: 336documentation/manual/intro.rst, use:
275 337
276 Please check this :ref:`manual/intro:Cross-References to Locations in the Same Document` 338 Please check this :ref:`manual/intro:Cross-References to Locations in the Same Document`
277 339
@@ -294,7 +356,8 @@ Extlinks
294 356
295The sphinx.ext.extlinks extension is enabled by default 357The sphinx.ext.extlinks extension is enabled by default
296(https://sublime-and-sphinx-guide.readthedocs.io/en/latest/references.html#use-the-external-links-extension), 358(https://sublime-and-sphinx-guide.readthedocs.io/en/latest/references.html#use-the-external-links-extension),
297and it is configured with: 359and it is configured with the 'extlinks' definitions in
360the 'documentation/conf.py' file:
298 361
299 'yocto_home': ('https://yoctoproject.org%s', None), 362 'yocto_home': ('https://yoctoproject.org%s', None),
300 'yocto_wiki': ('https://wiki.yoctoproject.org%s', None), 363 'yocto_wiki': ('https://wiki.yoctoproject.org%s', None),
@@ -306,6 +369,10 @@ and it is configured with:
306 'yocto_git': ('https://git.yoctoproject.org%s', None), 369 'yocto_git': ('https://git.yoctoproject.org%s', None),
307 'oe_home': ('https://www.openembedded.org%s', None), 370 'oe_home': ('https://www.openembedded.org%s', None),
308 'oe_lists': ('https://lists.openembedded.org%s', None), 371 'oe_lists': ('https://lists.openembedded.org%s', None),
372 'oe_git': ('https://git.openembedded.org%s', None),
373 'oe_wiki': ('https://www.openembedded.org/wiki%s', None),
374 'oe_layerindex': ('https://layers.openembedded.org%s', None),
375 'oe_layer': ('https://layers.openembedded.org/layerindex/branch/master/layer%s', None),
309 376
310It creates convenient shortcuts which can be used throughout the 377It creates convenient shortcuts which can be used throughout the
311documentation rst files, as: 378documentation rst files, as:
@@ -320,12 +387,29 @@ The sphinx.ext.intersphinx extension is enabled by default
320so that we can cross reference content from other Sphinx based 387so that we can cross reference content from other Sphinx based
321documentation projects, such as the BitBake manual. 388documentation projects, such as the BitBake manual.
322 389
323References to the bitbake manual can be done like this: 390References to the BitBake manual can directly be done:
391 - With a specific description instead of the section name:
392 :ref:`Azure Storage fetcher (az://) <bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`
393 - With the section name:
394 :ref:`bitbake-user-manual/bitbake-user-manual-intro:usage and syntax` option
395
396If you want to refer to an entire document (or chapter) in the BitBake manual,
397you have to use the ":doc:" macro with the "bitbake:" prefix:
398 - :doc:`BitBake User Manual <bitbake:index>`
399 - :doc:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata`" chapter
400
401Note that a reference to a variable (:term:`VARIABLE`) automatically points to
402the BitBake manual if the variable is not described in the Reference Manual's Variable Glossary.
403However, if you need to bypass this, you can explicitely refer to a description in the
404BitBake manual as follows:
324 405
325 See the ":ref:`-D <bitbake:bitbake-user-manual/bitbake-user-manual-intro:usage and syntax>`" option
326or
327 :term:`bitbake:BB_NUMBER_PARSE_THREADS` 406 :term:`bitbake:BB_NUMBER_PARSE_THREADS`
328 407
408This would be the same if we had identical document filenames in
409both the Yocto Project and BitBake manuals:
410
411 :ref:`bitbake:directory/file:section title`
412
329Submitting documentation changes 413Submitting documentation changes
330================================ 414================================
331 415