Skip to content

Commit 9a5df92

Browse files
authored
Add make autobuild to rebuild and reload HTML files in your browser (#1208)
1 parent 4afd584 commit 9a5df92

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ help:
2525
@echo " venv to create a venv with necessary tools"
2626
@echo " html to make standalone HTML files"
2727
@echo " htmlview to open the index page built by the html target in your browser"
28+
@echo " autobuild to rebuild and reload HTML files in your browser"
2829
@echo " clean to remove the venv and build files"
2930
@echo " dirhtml to make HTML files named index.html in directories"
3031
@echo " singlehtml to make a single large HTML file"
@@ -158,6 +159,11 @@ doctest: html
158159
htmlview: html
159160
$(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('_build/html/index.html'))"
160161

162+
.PHONY: autobuild
163+
autobuild: SPHINXBUILD = $(VENVDIR)/bin/sphinx-autobuild
164+
autobuild: SPHINXOPTS = --re-ignore="/\.idea/|/venv/"
165+
autobuild: html
166+
161167
.PHONY: check
162168
check: ensure-venv
163169
# Ignore the tools and venv dirs and check that the default role is not used.

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
Sphinx~=7.2.6
21
furo>=2022.6.4
32
jinja2
3+
sphinx-autobuild
44
sphinx-inline-tabs>=2023.4.21
55
sphinx-lint==0.6.8
66
sphinx-notfound-page>=1.0.0
77
sphinx_copybutton>=0.3.3
88
sphinxext-opengraph>=0.7.1
99
sphinxext-rediraffe
10+
Sphinx~=7.2.6

0 commit comments

Comments
 (0)