mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-05-29 18:23:24 +03:00
Add make [-C docs] htmllive
to rebuild and reload HTML files (#8913)
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
parent
d546233be4
commit
03e7871afd
5
Makefile
5
Makefile
|
@ -23,6 +23,10 @@ doc html:
|
|||
htmlview:
|
||||
$(MAKE) -C docs htmlview
|
||||
|
||||
.PHONY: htmllive
|
||||
htmllive:
|
||||
$(MAKE) -C docs htmllive
|
||||
|
||||
.PHONY: doccheck
|
||||
doccheck:
|
||||
$(MAKE) doc
|
||||
|
@ -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"
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
from __future__ import annotations
|
||||
|
||||
from livereload.compiler import shell
|
||||
from livereload.task import Task
|
||||
|
||||
Task.add("*.rst", shell("make html"))
|
||||
Task.add("*/*.rst", shell("make html"))
|
||||
Task.add("Makefile", shell("make html"))
|
||||
Task.add("conf.py", shell("make html"))
|
|
@ -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"
|
||||
@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"
|
||||
|
@ -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:
|
||||
|
|
|
@ -44,6 +44,7 @@ optional-dependencies.docs = [
|
|||
"furo",
|
||||
"olefile",
|
||||
"sphinx>=8.2",
|
||||
"sphinx-autobuild",
|
||||
"sphinx-copybutton",
|
||||
"sphinx-inline-tabs",
|
||||
"sphinxext-opengraph",
|
||||
|
|
Loading…
Reference in New Issue
Block a user