on master help sign in
[mod] make docs-live - remove --port option from sphinx-autobuild

Setting port fixed to 8080 has drawbacks when this port is already in use from another application [1]. Removing this option from the command line offers the use of the sphinx-autobuild defaults which are much more flexible [2]. [1] https://github.com/searx/searx/issues/2282 [2] https://github.com/executablebooks/sphinx-autobuild/blob/master/README.md Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>

commite697d78d5a907014252df9aec79d981b800aac91 authorMarkus Heiser <markus.heiser@darmarit.de> dateThu 29 Oct 2020, 13:31 (6 years ago) parent54afe37
2 files changed+17−2
docs/dev/contribution_guide.rst+16−1 utils/makefile.sphinx+1−1
docs/dev/contribution_guide.rst+16−1
@@ -141,6 +141,9 @@ Here is an example which makes a complete rebuild:
141141live build
142142----------
143143
144+.. _sphinx-autobuild:
145+ https://github.com/executablebooks/sphinx-autobuild/blob/master/README.md
146+
144147.. sidebar:: docs-clean
145148
146149 It is recommended to assert a complete rebuild before deploying (use
@@ -156,9 +159,21 @@ changed.
156159 $ make docs-live
157160 ...
158161 The HTML pages are in dist/docs.
159− ... Serving on http://0.0.0.0:8080
162+ ... Serving on http://0.0.0.0:8000
160163 ... Start watching changes
161164
165+Live builds are implemented by sphinx-autobuild_. Use environment
166+``$(SPHINXOPTS)`` to pass arguments to the sphinx-autobuild_ command. Except
167+option ``--host`` (which is always set to ``0.0.0.0``) you can pass any
168+argument. E.g to find and use a free port, use:
169+
170+.. code:: sh
171+
172+ $ SPHINXOPTS="--port 0" make docs-live
173+ ...
174+ ... Serving on http://0.0.0.0:50593
175+ ...
176+
162177
163178.. _deploy on github.io:
164179
utils/makefile.sphinx+1−1
@@ -79,7 +79,7 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(DOCS_DIST)/$5)
7979 -b $2 -c $3 -d $(DOCS_BUILD)/.doctrees $4 $(DOCS_DIST)/$5
8080
8181quiet_cmd_sphinx_autobuild = SPHINX $@ --> file://$(abspath $(DOCS_DIST)/$5)
82− cmd_sphinx_autobuild = PATH="$(PY_ENV_BIN):$(PATH)" $(PY_ENV_BIN)/sphinx-autobuild $(SPHINX_VERBOSE) --open-browser --host 0.0.0.0 --port 8080 $(SPHINXOPTS)\
82+ cmd_sphinx_autobuild = PATH="$(PY_ENV_BIN):$(PATH)" $(PY_ENV_BIN)/sphinx-autobuild $(SPHINX_VERBOSE) --open-browser --host 0.0.0.0 $(SPHINXOPTS)\
8383 -b $2 -c $3 -d $(DOCS_BUILD)/.doctrees $4 $(DOCS_DIST)/$5
8484
8585quiet_cmd_sphinx_clean = CLEAN $@