diff options
Diffstat (limited to 'documentation/README')
-rw-r--r-- | documentation/README | 90 |
1 files changed, 62 insertions, 28 deletions
diff --git a/documentation/README b/documentation/README index 8035418cac..56eac7ca19 100644 --- a/documentation/README +++ b/documentation/README | |||
@@ -108,32 +108,9 @@ generated with DocBook. | |||
108 | How to build the Yocto Project documentation | 108 | How to build the Yocto Project documentation |
109 | ============================================ | 109 | ============================================ |
110 | 110 | ||
111 | Sphinx is written in Python. While it might work with Python2, for | 111 | To build the documentation, you need Sphinx and a few other packages, |
112 | obvious reasons, we will only support building the Yocto Project | 112 | which depend on your host GNU/Linux distribution. Such packages are listed on |
113 | documentation with Python3. | 113 | https://docs.yoctoproject.org/dev/ref-manual/system-requirements.html#required-packages-for-the-build-host |
114 | |||
115 | Sphinx might be available in your Linux distro packages repositories, | ||
116 | however it is not recommended to use distro packages, as they might be | ||
117 | old versions, especially if you are using an LTS version of your | ||
118 | distro. The recommended method to install the latest versions of Sphinx | ||
119 | and of its required dependencies is to use the Python Package Index (pip). | ||
120 | |||
121 | To install all required packages run: | ||
122 | |||
123 | $ pip3 install sphinx sphinx_rtd_theme pyyaml | ||
124 | |||
125 | To make sure you always have the latest versions of such packages, you | ||
126 | should regularly run the same command with an added "--upgrade" option: | ||
127 | |||
128 | $ pip3 install --upgrade sphinx sphinx_rtd_theme pyyaml | ||
129 | |||
130 | Also install the "inkscape" package from your distribution. | ||
131 | Inkscape is need to convert SVG graphics to PNG (for EPUB | ||
132 | export) and to PDF (for PDF export). | ||
133 | |||
134 | Additionally install "fncychap.sty" TeX font if you want to build PDFs. Debian | ||
135 | and Ubuntu have it in "texlive-latex-extra" package while RedHat distributions | ||
136 | and OpenSUSE have it in "texlive-fncychap" package for example. | ||
137 | 114 | ||
138 | To build the documentation locally, run: | 115 | To build the documentation locally, run: |
139 | 116 | ||
@@ -165,6 +142,36 @@ To run Vale: | |||
165 | 142 | ||
166 | $ make stylecheck | 143 | $ make stylecheck |
167 | 144 | ||
145 | Style checking the whole documentation might take some time and generate a | ||
146 | lot of warnings/errors, thus one can run Vale on a subset of files or | ||
147 | directories: | ||
148 | |||
149 | $ make stylecheck VALEDOCS=<file> | ||
150 | $ make stylecheck VALEDOCS="<file1> <file2>" | ||
151 | $ make stylecheck VALEDOCS=<dir> | ||
152 | |||
153 | Lint checking the Yocto Project documentation | ||
154 | ============================================= | ||
155 | |||
156 | To fix errors which are not reported by Sphinx itself, | ||
157 | the project uses sphinx-lint (https://github.com/sphinx-contrib/sphinx-lint). | ||
158 | |||
159 | To install sphinx-lint: | ||
160 | |||
161 | $ pip install sphinx-lint | ||
162 | |||
163 | To run sphinx-lint: | ||
164 | |||
165 | $ make sphinx-lint | ||
166 | |||
167 | Lint checking the whole documentation might take some time and generate a | ||
168 | lot of warnings/errors, thus one can run sphinx-lint on a subset of files | ||
169 | or directories: | ||
170 | |||
171 | $ make sphinx-lint SPHINXLINTDOCS=<file> | ||
172 | $ make sphinx-lint SPHINXLINTDOCS="<file1> <file2>" | ||
173 | $ make sphinx-lint SPHINXLINTDOCS=<dir> | ||
174 | |||
168 | Sphinx theme and CSS customization | 175 | Sphinx theme and CSS customization |
169 | ================================== | 176 | ================================== |
170 | 177 | ||
@@ -307,6 +314,16 @@ See https://stackoverflow.com/questions/27420317/restructured-text-rst-http-link | |||
307 | Anchor (<#link>) links are forbidden as they are not checked by Sphinx during | 314 | Anchor (<#link>) links are forbidden as they are not checked by Sphinx during |
308 | the build and may be broken without knowing about it. | 315 | the build and may be broken without knowing about it. |
309 | 316 | ||
317 | It is also possible to refer to another document within yocto-docs with the | ||
318 | :doc: directive (c.f. | ||
319 | https://www.sphinx-doc.org/en/master/usage/referencing.html#role-doc), e.g.: | ||
320 | |||
321 | For more information, read :doc:`/bsp-guide/index`. | ||
322 | |||
323 | Note that only "absolute" paths (starting with a '/') are allowed. The root | ||
324 | directory of that path is documentation/, that is, :doc:`/bsp-guide/index` | ||
325 | points at documentation/bsp-guide/index.rst. | ||
326 | |||
310 | References | 327 | References |
311 | ========== | 328 | ========== |
312 | 329 | ||
@@ -399,5 +416,22 @@ both the Yocto Project and BitBake manuals: | |||
399 | Submitting documentation changes | 416 | Submitting documentation changes |
400 | ================================ | 417 | ================================ |
401 | 418 | ||
402 | Please see the top level README file in this repository for details of where | 419 | Please refer to our contributor guide here: https://docs.yoctoproject.org/contributor-guide/ |
403 | to send patches. | 420 | for full details on how to submit changes. |
421 | |||
422 | As a quick guide, patches should be sent to docs@lists.yoctoproject.org | ||
423 | The git command to do that would be: | ||
424 | |||
425 | git send-email -M -1 --to docs@lists.yoctoproject.org | ||
426 | |||
427 | The 'To' header can be set as default for this repository: | ||
428 | |||
429 | git config sendemail.to docs@lists.yoctoproject.org | ||
430 | |||
431 | Now you can just do 'git send-email origin/master..' to send all local patches. | ||
432 | |||
433 | Read the other sections in this document and documentation/standards.md for | ||
434 | rules to follow when contributing to the documentation. | ||
435 | |||
436 | Git repository: https://git.yoctoproject.org/yocto-docs | ||
437 | Mailing list: docs@lists.yoctoproject.org | ||