feat: add servedocs make target and HTTP server to generate_docs.py

Add a new `servedocs` Makefile target that runs `generate_docs.py --serve`, enabling continuous doc generation and local web serving. Extend the Python script with `RootedHTTPServer` and `RootedHTTPRequestHandler` classes to serve generated HTML files from the output directory, refreshing content on each request via `format_files(True)`. Also update the shebang to `python3` and change the conversion print message from "converted" to "Built".
This commit is contained in:
Bob Nystrom
2017-10-12 13:38:34 +00:00
parent 5ab44d7203
commit 1d1e5d68ad
2 changed files with 56 additions and 3 deletions
+4
View File
@@ -91,6 +91,10 @@ benchmark: release
docs:
$(V) ./util/generate_docs.py
# Continuously generate and serve the Wren site.
servedocs:
$(V) ./util/generate_docs.py --serve
# Continuously generate the Wren site.
watchdocs:
$(V) ./util/generate_docs.py --watch