diff --git a/docs/Makefile b/docs/Makefile index 1acebe9..3ef4fef 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -9,7 +9,7 @@ SPHINXBUILD = python3 -msphinx SOURCEDIR = . BUILDDIR = _build -default: fast +default: fasthtml # Put it first so that "make" without argument is like "make help". help: @@ -22,5 +22,7 @@ help: %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -fast: Makefile - @$(SPHINXBUILD) -b fasthtml "$(SOURCEDIR)" "$(BUILDDIR)/html" $(SPHINXOPTS) $(O) +# Without "make mode" we can specify OUTPUTDIR and DOCTREEDIR precisely +# so that we can make sure to share all output with the HTML builder. +fasthtml: Makefile + @$(SPHINXBUILD) -b $@ "$(SOURCEDIR)" "$(BUILDDIR)/html" $(SPHINXOPTS) $(O) -d "$(BUILDDIR)/doctrees" diff --git a/docs/conf.py b/docs/conf.py index ef4344b..6fd9547 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -131,12 +131,12 @@ autoclass_content = 'init' autodoc_typehints = 'description' -extensions.append('sphinx.ext.intersphinx') -intersphinx_mapping = { - 'python': ('https://docs.python.org/3', None), - 'sphinx': ('https://www.sphinx-doc.org/en/master', None), - 'jinja': ('https://jinja.palletsprojects.com/en/latest/', None), -} +# extensions.append('sphinx.ext.intersphinx') +# intersphinx_mapping = { +# 'python': ('https://docs.python.org/3', None), +# 'sphinx': ('https://www.sphinx-doc.org/en/master', None), +# 'jinja': ('https://jinja.palletsprojects.com/en/latest/', None), +# } # extensions.append('sphinxnotes.comboroles') diff --git a/docs/index.rst b/docs/index.rst index c769f1f..0a4a47a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -84,7 +84,7 @@ builtin ``html`` builder: :language: make :lines: 25- -Then use ``make fast`` to run the fast HTML build. +Then use ``make fasthtml`` to run the fast HTML build. .. ADDITIONAL CONTENT END diff --git a/utils/bench.sh b/utils/bench.sh index 64f0767..390cc2f 100755 --- a/utils/bench.sh +++ b/utils/bench.sh @@ -22,7 +22,7 @@ compare() { time make SPHINXOPTS=-Q fast echo ">>> Standard build" echo "Another line" >> index.rst - time make SPHINXOPTS=-Q html + time make SPHINXOPTS=-Q fasthtml } echo "=== Sphinx" @@ -30,8 +30,8 @@ git clone --quiet --branch v7.3.7 --depth 1 https://github.com/sphinx-doc/sphinx cd sphinx/doc echo "extensions.append('sphinxnotes.fasthtml')" >> conf.py cat <<'EOF' >> Makefile -fast: Makefile - @$(SPHINXBUILD) -b fasthtml "$(SOURCEDIR)" "$(BUILDDIR)/html" $(SPHINXOPTS) $(O) +fasthtml: Makefile + @$(SPHINXBUILD) -b $@ "$(SOURCEDIR)" "$(BUILDDIR)/html" $(SPHINXOPTS) $(O) -d "$(BUILDDIR)/doctrees" EOF compare cd ..