@@ -159,9 +159,14 @@ Spelling check
159
159
160
160
Before you commit your docs, it's a good idea to run the spelling checker.
161
161
You'll need to install :pypi:`sphinxcontrib-spelling` first. Then from the
162
- ``docs`` directory, run ``make spelling``. Wrong words (if any) along with the
163
- file and line number where they occur will be saved to
164
- ``_build/spelling/output.txt``.
162
+ ``docs`` directory, run:
163
+
164
+ .. console::
165
+
166
+ $ make spelling
167
+
168
+ Wrong words (if any) along with the file and line number where they occur will
169
+ be saved to ``_build/spelling/output.txt``.
165
170
166
171
If you encounter false-positives (error output that actually is correct), do
167
172
one of the following:
@@ -179,10 +184,21 @@ Link check
179
184
180
185
Links in documentation can become broken or changed such that they are no
181
186
longer the canonical link. Sphinx provides a builder that can check whether the
182
- links in the documentation are working. From the ``docs`` directory, run ``make
183
- linkcheck``. Output is printed to the terminal, but can also be found in
187
+ links in the documentation are working. From the ``docs`` directory, run:
188
+
189
+ .. console::
190
+
191
+ $ make linkcheck
192
+
193
+ Output is printed to the terminal, but can also be found in
184
194
``_build/linkcheck/output.txt`` and ``_build/linkcheck/output.json``.
185
195
196
+ .. warning::
197
+
198
+ The execution of the command requires an internet connection and takes
199
+ several minutes to complete, because the command tests all the links
200
+ that are found in the documentation.
201
+
186
202
Entries that have a status of "working" are fine, those that are "unchecked" or
187
203
"ignored" have been skipped because they either cannot be checked or have
188
204
matched ignore rules in the configuration.
@@ -290,7 +306,8 @@ documentation:
290
306
display a link with the title "auth".
291
307
292
308
* All Python code blocks should be formatted using the :pypi:`blacken-docs`
293
- auto-formatter. This will be run by ``pre-commit`` if that is configured.
309
+ auto-formatter. This will be run by :ref:`pre-commit
310
+ <coding-style-pre-commit>` if that is configured.
294
311
295
312
* Use :mod:`~sphinx.ext.intersphinx` to reference Python's and Sphinx'
296
313
documentation.
@@ -324,8 +341,9 @@ documentation:
324
341
Five
325
342
^^^^
326
343
327
- * Use :rst:role:`:rfc:<rfc>` to reference RFC and try to link to the relevant
328
- section if possible. For example, use ``:rfc:`2324#section-2.3.2``` or
344
+ * Use :rst:role:`:rfc:<rfc>` to reference a Request for Comments (RFC) and
345
+ try to link to the relevant section if possible. For example, use
346
+ ``:rfc:`2324#section-2.3.2``` or
329
347
``:rfc:`Custom link text <2324#section-2.3.2>```.
330
348
331
349
* Use :rst:role:`:pep:<pep>` to reference a Python Enhancement Proposal (PEP)
@@ -339,6 +357,9 @@ documentation:
339
357
also need to define a reference to the documentation for that environment
340
358
variable using :rst:dir:`.. envvar:: <envvar>`.
341
359
360
+ * Use :rst:role:`:cve:<cve>` to reference a Common Vulnerabilities and
361
+ Exposures (CVE) identifier. For example, use ``:cve:`2019-14232```.
362
+
342
363
Django-specific markup
343
364
======================
344
365
@@ -518,7 +539,7 @@ Minimizing images
518
539
Optimize image compression where possible. For PNG files, use OptiPNG and
519
540
AdvanceCOMP's ``advpng``:
520
541
521
- .. code-block:: console
542
+ .. console::
522
543
523
544
$ cd docs
524
545
$ optipng -o7 -zm1-9 -i0 -strip all `find . -type f -not -path "./_build/*" -name "*.png"`
@@ -619,6 +640,10 @@ included in the Django repository and the releases as
619
640
``docs/man/django-admin.1``. There isn't a need to update this file when
620
641
updating the documentation, as it's updated once as part of the release process.
621
642
622
- To generate an updated version of the man page, run ``make man`` in the
623
- ``docs`` directory. The new man page will be written in
624
- ``docs/_build/man/django-admin.1``.
643
+ To generate an updated version of the man page, in the ``docs`` directory, run:
644
+
645
+ .. console::
646
+
647
+ $ make man
648
+
649
+ The new man page will be written in ``docs/_build/man/django-admin.1``.
0 commit comments