]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Docs: Add `make htmllive` to rebuild and reload HTML files in your browser (#111900)
authorHugo van Kemenade <hugovk@users.noreply.github.com>
Mon, 13 Nov 2023 08:06:49 +0000 (10:06 +0200)
committerGitHub <noreply@github.com>
Mon, 13 Nov 2023 08:06:49 +0000 (10:06 +0200)
Doc/Makefile
Doc/requirements.txt

index 78ee4271e25f79372eda9facd886b44782592d1b..7af56e965e1be40eee48897b7c96e06cff874b23 100644 (file)
@@ -29,6 +29,7 @@ help:
        @echo "  venv       to create a venv with necessary tools"
        @echo "  html       to make standalone HTML files"
        @echo "  htmlview   to open the index page built by the html target in your browser"
+       @echo "  htmllive   to rebuild and reload HTML files in your browser"
        @echo "  htmlhelp   to make HTML files and a HTML help project"
        @echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
        @echo "  text       to make plain text files"
@@ -139,6 +140,11 @@ pydoc-topics: build
 htmlview: html
        $(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/html/index.html'))"
 
+.PHONY: htmllive
+htmllive: SPHINXBUILD = $(VENVDIR)/bin/sphinx-autobuild
+htmllive: SPHINXOPTS = --re-ignore="/venv/"
+htmllive: html
+
 .PHONY: clean
 clean: clean-venv
        -rm -rf build/*
index d4f23ea8c400fed44b935705b22ecd24d3b16607..ce87be2d39282452b990e13e05b23940842d82e2 100644 (file)
@@ -11,6 +11,7 @@ sphinx==6.2.1
 
 blurb
 
+sphinx-autobuild
 sphinxext-opengraph==0.7.5
 
 # The theme used by the documentation is stored separately, so we need