Skip to content

Commit 03e7871

Browse files
hugovkradarhere
andauthored
Add make [-C docs] htmllive to rebuild and reload HTML files (#8913)
Co-authored-by: Andrew Murray <[email protected]>
1 parent d546233 commit 03e7871

File tree

4 files changed

+11
-14
lines changed

4 files changed

+11
-14
lines changed

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ doc html:
2323
htmlview:
2424
$(MAKE) -C docs htmlview
2525

26+
.PHONY: htmllive
27+
htmllive:
28+
$(MAKE) -C docs htmllive
29+
2630
.PHONY: doccheck
2731
doccheck:
2832
$(MAKE) doc
@@ -43,6 +47,7 @@ help:
4347
@echo " docserve run an HTTP server on the docs directory"
4448
@echo " html make HTML docs"
4549
@echo " htmlview open the index page built by the html target in your browser"
50+
@echo " htmllive rebuild and reload HTML files in your browser"
4651
@echo " install make and install"
4752
@echo " install-coverage make and install with C coverage"
4853
@echo " lint run the lint checks"

docs/Guardfile

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ help:
2020
@echo "Please use \`make <target>' where <target> is one of"
2121
@echo " html to make standalone HTML files"
2222
@echo " htmlview to open the index page built by the html target in your browser"
23+
@echo " htmllive to rebuild and reload HTML files in your browser"
2324
@echo " serve to start a local server for viewing docs"
24-
@echo " livehtml to start a local server for viewing docs and auto-reload on change"
2525
@echo " dirhtml to make HTML files named index.html in directories"
2626
@echo " singlehtml to make a single large HTML file"
2727
@echo " pickle to make pickle files"
@@ -201,9 +201,10 @@ doctest:
201201
htmlview: html
202202
$(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('$(BUILDDIR)/html/index.html'))"
203203

204-
.PHONY: livehtml
205-
livehtml: html
206-
livereload $(BUILDDIR)/html -p 33233
204+
.PHONY: htmllive
205+
htmllive: SPHINXBUILD = $(PYTHON) -m sphinx_autobuild
206+
htmllive: SPHINXOPTS = --open-browser --delay 0
207+
htmllive: html
207208

208209
.PHONY: serve
209210
serve:

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ optional-dependencies.docs = [
4444
"furo",
4545
"olefile",
4646
"sphinx>=8.2",
47+
"sphinx-autobuild",
4748
"sphinx-copybutton",
4849
"sphinx-inline-tabs",
4950
"sphinxext-opengraph",

0 commit comments

Comments
 (0)