#37157: Add "htmllive" for docs development (sphinx-autobuild)
-------------------------------------+-------------------------------------
Reporter: Mike Edmunds | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: 6.0
Severity: Normal | Resolution:
Keywords: sphinx | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mike Edmunds):
* owner: Mike Edmunds => (none)
* status: assigned => new
Comment:
Note that sphinx-autobuild can be used with the existing docs/Makefile by
setting a few variables:
{{{#!shell
python -m pip install sphinx-autobuild
cd docs
SPHINXBUILD=sphinx-autobuild SPHINXOPTS=--open-browser make dirhtml
}}}
You can substitute `make html` or any other html-like target. Set
`SPHINXOPTS='--open-browser --delay 0'` if you want the browser to open
faster.
Something similar should work on Windows with docs/make.bat, which
supports the same variables. (Command syntax is left as an exercise for
the reader.)
Although "htmllive" and "dirhtmllive" Makefile targets would be nice, that
does add a docs dependency on sphinx-autobuild. (Or starts us down the
path of installing dependencies on demand, which is what CPython's
Makefile does.) We might prefer to just mention using sphinx-autobuild as
a tip in the contributor docs.
--
Ticket URL: <
https://code.djangoproject.com/ticket/37157#comment:2>