From 05ac438c3cb884732b42bbf8e25e3636384357d8 Mon Sep 17 00:00:00 2001 From: Scott Sanderson Date: Fri, 27 May 2016 16:39:29 -0400 Subject: [PATCH] DOC/DEV: Add sphinx-autobuild to docs. Adds a `make livehtml` target that spawns a server that rebuilds and serves the docs every time a change happens. --- docs/Makefile | 6 +++++- etc/requirements_docs.txt | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/Makefile b/docs/Makefile index d49ab547..666dc804 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -19,12 +19,13 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) sou # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source -.PHONY: help build clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext +.PHONY: help build clean html livehtml dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext help: @echo "Please use \`make ' where is one of" @echo " build to build the C and Cython extensions for zipline" @echo " html to make standalone HTML files" + @echo " livehtml to run a persistent process that rebuilds the docs" @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" @@ -61,6 +62,9 @@ html: build @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." +livehtml: build + sphinx-autobuild -p 9999 -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + dirhtml: build $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo diff --git a/etc/requirements_docs.txt b/etc/requirements_docs.txt index 8dc2d5c1..362d4725 100644 --- a/etc/requirements_docs.txt +++ b/etc/requirements_docs.txt @@ -1,2 +1,3 @@ Sphinx>=1.3.2 numpydoc>=0.5.0 +sphinx-autobuild==0.6.0