We’ve added a new make target for the CPython docs, PEPs and devguide to make iterative editing of docs easier: make htmllive
make html - build docs as HTML
make htmlview - build docs and open static HTML index page in browser
make htmllive - build docs, start a server, and when you save the reST pages you are editing, it will automatically rebuild the docs and reload your page in the browser
With the old make html, you need to tab between three windows:
go to IDE, edit files
go to terminal, run make html
go to browser, reload page and check results
When running the new make htmllive it’s just two:
go to IDE, edit files
go to terminal, run make html
go to browser, reload page and check results
Reminder: run make clean venv first to install the dependencies. And for CPython docs, either run make -C Doc <target> from the root or cd Doc first.
Do I understand correctly that when using make htmllive I have to navigate to the local server manually, once? That’s what I experienced when trying this.
Note, I didn’t add it to make.bat because I don’t have Windows to test it. Would a Windows user like to add the equivalent commands to make.bat? I’d suggest the devguide first.
That’s right, there’s a link like [sphinx-autobuild] Serving on http://127.0.0.1:8000 to click. There is actually an --open-browser option we can add so the browser opens on first run. Sounds useful, shall we add it?