Skip to content

Commit cb997f0

Browse files
committed
[3.11] Docs: Add make htmllive to rebuild and reload HTML files in your browser (pythonGH-111900).
(cherry picked from commit a430b4f) Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent b64afbc commit cb997f0

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Doc/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ help:
3232
@echo " venv to create a venv with necessary tools"
3333
@echo " html to make standalone HTML files"
3434
@echo " htmlview to open the index page built by the html target in your browser"
35+
@echo " htmllive to rebuild and reload HTML files in your browser"
3536
@echo " htmlhelp to make HTML files and a HTML help project"
3637
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
3738
@echo " text to make plain text files"
@@ -142,6 +143,11 @@ pydoc-topics: build
142143
htmlview: html
143144
$(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/html/index.html'))"
144145

146+
.PHONY: htmllive
147+
htmllive: SPHINXBUILD = $(VENVDIR)/bin/sphinx-autobuild
148+
htmllive: SPHINXOPTS = --re-ignore="/venv/"
149+
htmllive: html
150+
145151
clean: clean-venv
146152
-rm -rf build/*
147153

Doc/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ sphinx==4.5.0
1010

1111
blurb
1212

13+
sphinx-autobuild
1314
sphinxext-opengraph>=0.7.1
1415

1516
# The theme used by the documentation is stored separately, so we need

0 commit comments

Comments
 (0)