diff options
| author | David Smith <smithdc@gmail.com> | 2025-06-25 21:40:07 +0100 |
|---|---|---|
| committer | Natalia <124304+nessita@users.noreply.github.com> | 2025-08-05 12:20:13 -0300 |
| commit | a9c7d4b703759e9903dd92899dd8ac662007baf3 (patch) | |
| tree | 843808a338237963f0f8593281e6aff2f481b31e /docs/internals/contributing/writing-documentation.txt | |
| parent | 5ad6d43cd9ae05d3575f9e7bb1cb488bce5d905d (diff) | |
[5.2.x] Refs #36485 -- Grouped docs checks under a unified make check target.
Added a new 'check' rule to the docs Makefile which runs both the black
and spelling checks.
Backport of 7f9bf357feac06bb34017e1f6c7a7730b1991ede from main.
Diffstat (limited to 'docs/internals/contributing/writing-documentation.txt')
| -rw-r--r-- | docs/internals/contributing/writing-documentation.txt | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/docs/internals/contributing/writing-documentation.txt b/docs/internals/contributing/writing-documentation.txt index f16cdc7cc7..52d543e97b 100644 --- a/docs/internals/contributing/writing-documentation.txt +++ b/docs/internals/contributing/writing-documentation.txt @@ -152,10 +152,29 @@ To edit this page, for example, we would edit the file :source:`docs/internals/contributing/writing-documentation.txt` and rebuild the HTML with ``make html``. +.. _documentation-checks: + +Documentation quality checks +---------------------------- + +Several checks help maintain Django's documentation quality, including +:ref:`spelling <documentation-spelling-check>` and +:ref:`code block formatting <documentation-code-block-format-check>`. + +These checks are run automatically in CI and must pass before documentation +changes can be merged. They can also be run locally with a single command: + +.. console:: + + $ make check + +This command runs all current checks and will include any new checks added in +the future. + .. _documentation-spelling-check: Spelling check --------------- +~~~~~~~~~~~~~~ Before you commit your docs, it's a good idea to run the spelling checker. You'll need to install :pypi:`sphinxcontrib-spelling` first. Then from the @@ -180,7 +199,7 @@ one of the following: .. _documentation-code-block-format-check: Code block format check ------------------------ +~~~~~~~~~~~~~~~~~~~~~~~ All Python code blocks should be formatted using the :pypi:`blacken-docs` auto-formatter. This is automatically run by the :ref:`pre-commit hook |
