From f7ccb485745a6e3eac07f5e60849c91948634a6e Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 12 Nov 2023 13:48:34 +0200 Subject: [PATCH] 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 --- Makefile | 6 ++++++ requirements.txt | 2 ++ 2 files changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 43f72f8a9..42844084f 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/requirements.txt b/requirements.txt index bf7a8470e..1c716bc5d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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