Skip to content

Commit

Permalink
Infra: Add make htmllive to rebuild and reload HTML files in your b…
Browse files Browse the repository at this point in the history
…rowser (#3521)

Add 'make htmllive' to rebuild and reload HTML files in your browser
  • Loading branch information
hugovk authored Nov 12, 2023
1 parent 9afa294 commit f7ccb48
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ html: venv
htmlview: html
$(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/index.html'))"

## htmllive to rebuild and reload HTML files in your browser
.PHONY: htmllive
htmllive: SPHINXBUILD = $(VENVDIR)/bin/sphinx-autobuild
htmllive: SPHINXERRORHANDLING = --re-ignore="/\.idea/|/venv/|/pep-0000.rst|/topic/"
htmllive: html

## dirhtml to render PEPs to "index.html" files within "pep-NNNN" directories
.PHONY: dirhtml
dirhtml: BUILDER = dirhtml
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Pygments >= 2.9.0
Sphinx >= 5.1.1, != 6.1.0, != 6.1.1
docutils >= 0.19.0

sphinx-autobuild

# For tests
pytest
pytest-cov

0 comments on commit f7ccb48

Please sign in to comment.