diff options
| author | SnippyCodes <aaryanparik124@gmail.com> | 2026-06-13 11:29:05 +0530 |
|---|---|---|
| committer | nessita <124304+nessita@users.noreply.github.com> | 2026-06-16 11:49:33 -0300 |
| commit | 967643959f0a6f5351e4fdeb48cf935d787e4e6a (patch) | |
| tree | 30d1c7422e05c0d96620a7aa2bdbc39174275039 /docs/internals/contributing/writing-documentation.txt | |
| parent | d1f3c2bcec865e79e25e59ca0564d9eb8715f2f7 (diff) | |
Fixed #37157 -- Doc'd usage of sphinx-autobuild for documentation auto-reloading.
Diffstat (limited to 'docs/internals/contributing/writing-documentation.txt')
| -rw-r--r-- | docs/internals/contributing/writing-documentation.txt | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/docs/internals/contributing/writing-documentation.txt b/docs/internals/contributing/writing-documentation.txt index a9fa1a0267..cbbe611d7c 100644 --- a/docs/internals/contributing/writing-documentation.txt +++ b/docs/internals/contributing/writing-documentation.txt @@ -142,6 +142,51 @@ will be themed differently than the documentation at `docs.djangoproject.com <https://docs.djangoproject.com/>`_. This is OK! If your changes look good on your local machine, they'll look good on the website. +Automating documentation rebuilds +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:pypi:`sphinx-autobuild` can be used to automatically rebuild the documentation +and reload the documentation page in the browser whenever a file changes. To +enable auto-reloading: + +1. Install the package: + + .. console:: + + $ python -m pip install sphinx-autobuild + +2. From the ``docs`` directory, run one of the following commands: + + * On Linux and macOS: + + .. code-block:: shell + + $ SPHINXBUILD=sphinx-autobuild SPHINXOPTS="--open-browser --delay 0" make html + + * On Windows (Command Prompt): + + .. code-block:: doscon + + ...\> set SPHINXBUILD=sphinx-autobuild + ...\> set SPHINXOPTS=--open-browser --delay 0 + ...\> make html + + * On Windows (PowerShell): + + .. code-block:: powershell + + PS> $env:SPHINXBUILD="sphinx-autobuild" + PS> $env:SPHINXOPTS="--open-browser --delay 0" + PS> make html + + Alternatively, ``sphinx-autobuild`` can be invoked directly: + + .. console:: + + $ sphinx-autobuild . _build/html --open-browser --delay 0 + +The auto-reloader can be stopped with ``Ctrl+C``. + Making edits to the documentation --------------------------------- |
