Infra: Add `make htmllive` to rebuild and reload HTML files in your browser (#3521)

Add 'make htmllive' to rebuild and reload HTML files in your browser
This commit is contained in:
Hugo van Kemenade 2023-11-12 13:48:34 +02:00 committed by GitHub
parent 9afa294e28
commit f7ccb48574
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -26,6 +26,12 @@ html: venv
htmlview: html
$(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/index.html'))"
## htmllive to rebuild and reload HTML files in your browser
.PHONY: htmllive
htmllive: SPHINXBUILD = $(VENVDIR)/bin/sphinx-autobuild
htmllive: SPHINXERRORHANDLING = --re-ignore="/\.idea/|/venv/|/pep-0000.rst|/topic/"
htmllive: html
## dirhtml to render PEPs to "index.html" files within "pep-NNNN" directories
.PHONY: dirhtml
dirhtml: BUILDER = dirhtml

View File

@ -5,6 +5,8 @@ Pygments >= 2.9.0
Sphinx >= 5.1.1, != 6.1.0, != 6.1.1
docutils >= 0.19.0
sphinx-autobuild
# For tests
pytest
pytest-cov