diff --git a/docs/Makefile b/docs/Makefile index 11efdb9c3fcf65b7f8ed02c8206e6e711891dbf1..68f368bc89f7e5b96a6162bfb93185a664427934 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -5,6 +5,7 @@ SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = +SOURCEDIR = source BUILDDIR = build # User-friendly check for sphinx-build @@ -19,11 +20,12 @@ 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 clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext +.PHONY: help clean watch html 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 " html to make standalone HTML files" + @echo " watch to make standalone HTML files and watch for changes" @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" @@ -51,6 +53,19 @@ help: clean: rm -rf $(BUILDDIR)/* +watch: clean + @echo + @echo "Building and watching for changes in the documentation." + sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" \ + -b html \ + --ignore='**venv' \ + --ignore='**.gitlab' \ + --ignore='*.egg-info' \ + --ignore='bin' \ + --ignore='**_includes/**/*.txt' \ + --watch='autosubmit' \ + $(SPHINXOPTS) $(O) + html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo diff --git a/docs/requirements.txt b/docs/requirements.txt index 82133027c9eb6dd3ff20c82704ecf25650e474f5..3bf337cd697ab0e0f6c350d1d1c1b82c0b5c2782 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,3 @@ -sphinx +sphinx==5.* +sphinx-autobuild==2021.3.* sphinx_rtd_theme