diff --git a/Makefile b/Makefile index 19c2499..ee53fa4 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest livehtml help: @echo "Please use \`make ' where is one of" @@ -128,3 +128,6 @@ doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." + +livehtml: + sphinx-autobuild -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html diff --git a/README.rst b/README.rst index e46d1a7..bb3cfb1 100644 --- a/README.rst +++ b/README.rst @@ -23,5 +23,9 @@ If you'd like to build the bootcamp locally: The resulting docs can be located under the ``_build/html`` directory. +You can also run ``make livehtml`` to launch a webserver on +http://127.0.0.1:8000 that auto-rebuild the documentation when any files are +changed. + .. _pip: https://pip.pypa.io/ .. _virtualenv: https://virtualenv.pypa.io/ diff --git a/requirements.txt b/requirements.txt index ab3f3dd..703bd0a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ Sphinx sphinx_rtd_theme +sphinx-autobuild