8000 Docs: Add `make htmllive` to rebuild and reload HTML files in your br… · python/cpython@a430b4f · GitHub
[go: up one dir, main page]

Skip to content

Commit a430b4f

Browse files
authored
Docs: Add make htmllive to rebuild and reload HTML files in your browser (#111900)
1 parent 1d75ef6 commit a430b4f

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
@@ -29,6 +29,7 @@ help:
2929
@echo " venv to create a venv with necessary tools"
3030
@echo " html to make standalone HTML files"
3131
@echo " htmlview to open the index page built by the html target in your browser"
32+
@echo " htmllive to rebuild and reload HTML files in your browser"
3233
@echo " htmlhelp to make HTML files and a HTML help project"
3334
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
3435
@echo " text to make plain text files"
@@ -139,6 +140,11 @@ pydoc-topics: build
139140
htmlview: html
140141
$(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/html/index.html'))"
141142

143+
.PHONY: htmllive
144+
htmllive: SPHINXBUILD = $(VENVDIR)/bin/sphinx-autobuild
145+
htmllive: SPHINXOPTS = --re-ignore="/venv/"
146+
htmllive: html
147+
142148
.PHONY: clean
143149
clean: clean-venv
144150
-rm -rf build/*

Doc/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ sphinx==6.2.1
1111

1212
blurb
1313

14+
sphinx-autobuild
1415
sphinxext-opengraph==0.7.5
1516

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

0 commit comments

Comments
 (0)
0