Skip to content

Add make [-C docs] htmllive to rebuild and reload HTML files #8913

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ doc html:
htmlview:
$(MAKE) -C docs htmlview

.PHONY: htmllive
htmllive:
$(MAKE) -C docs htmllive

.PHONY: doccheck
doccheck:
$(MAKE) doc
Expand All @@ -43,6 +47,7 @@ help:
@echo " docserve run an HTTP server on the docs directory"
@echo " html make HTML docs"
@echo " htmlview open the index page built by the html target in your browser"
@echo " htmllive rebuild and reload HTML files in your browser"
@echo " install make and install"
@echo " install-coverage make and install with C coverage"
@echo " lint run the lint checks"
Expand Down
10 changes: 0 additions & 10 deletions docs/Guardfile

This file was deleted.

9 changes: 5 additions & 4 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ help:
@echo "Please use \`make <target>' where <target> is one of"
@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"
Comment on lines 22 to +23
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@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 " htmllive to rebuild and reload HTML files in your browser"
@echo " htmlview to open the index page built by the html target in your browser"

If you, and you may not, make the other suggested change to be alphabetical, maybe this group of html* targets should be in the same order?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep this as is -- it's going from simpler action to more complex.

And actually, I'll revert the change to the top-level Makefile too.

@echo " serve to start a local server for viewing docs"
@echo " livehtml to start a local server for viewing docs and auto-reload on change"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
Expand Down Expand Up @@ -201,9 +201,10 @@ doctest:
htmlview: html
$(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('$(BUILDDIR)/html/index.html'))"

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

.PHONY: serve
serve:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ optional-dependencies.docs = [
"furo",
"olefile",
"sphinx>=8.2",
"sphinx-autobuild",
"sphinx-copybutton",
"sphinx-inline-tabs",
"sphinxext-opengraph",
Expand Down
Loading