Skip to content

Commit f7ccb48

Browse files
authored
Infra: Add make htmllive to rebuild and reload HTML files in your browser (python#3521)
Add 'make htmllive' to rebuild and reload HTML files in your browser
1 parent 9afa294 commit f7ccb48

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Makefile

+6
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ html: venv
2626
htmlview: html
2727
$(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/index.html'))"
2828

29+
## htmllive to rebuild and reload HTML files in your browser
30+
.PHONY: htmllive
31+
htmllive: SPHINXBUILD = $(VENVDIR)/bin/sphinx-autobuild
32+
htmllive: SPHINXERRORHANDLING = --re-ignore="/\.idea/|/venv/|/pep-0000.rst|/topic/"
33+
htmllive: html
34+
2935
## dirhtml to render PEPs to "index.html" files within "pep-NNNN" directories
3036
.PHONY: dirhtml
3137
dirhtml: BUILDER = dirhtml

requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Pygments >= 2.9.0
55
Sphinx >= 5.1.1, != 6.1.0, != 6.1.1
66
docutils >= 0.19.0
77

8+
sphinx-autobuild
9+
810
# For tests
911
pytest
1012
pytest-cov

0 commit comments

Comments
 (0)