on master help sign in
[mod] make docs-live - remove --port option from sphinx-autobuild
e697d78Markus Heiser
docs/dev/contribution_guide.rst+16−1
@@ -141,6 +141,9 @@ Here is an example which makes a complete rebuild:
141live build
141live build
142----------
142----------
143
143
144+.. _sphinx-autobuild:
145+ https://github.com/executablebooks/sphinx-autobuild/blob/master/README.md
146+
144.. sidebar:: docs-clean
147.. sidebar:: docs-clean
145
148
146 It is recommended to assert a complete rebuild before deploying (use
149 It is recommended to assert a complete rebuild before deploying (use
@@ -156,9 +159,21 @@ changed.
156 $ make docs-live
159 $ make docs-live
157 ...
160 ...
158 The HTML pages are in dist/docs.
161 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
160 ... Start watching changes
163 ... Start watching changes
161
164
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+
162
177
163.. _deploy on github.io:
178.. _deploy on github.io:
164
179
utils/makefile.sphinx+1−1
@@ -79,7 +79,7 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(DOCS_DIST)/$5)
79 -b $2 -c $3 -d $(DOCS_BUILD)/.doctrees $4 $(DOCS_DIST)/$5
79 -b $2 -c $3 -d $(DOCS_BUILD)/.doctrees $4 $(DOCS_DIST)/$5
80
80
81quiet_cmd_sphinx_autobuild = SPHINX $@ --> file://$(abspath $(DOCS_DIST)/$5)
81quiet_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)\
83 -b $2 -c $3 -d $(DOCS_BUILD)/.doctrees $4 $(DOCS_DIST)/$5
83 -b $2 -c $3 -d $(DOCS_BUILD)/.doctrees $4 $(DOCS_DIST)/$5
84
84
85quiet_cmd_sphinx_clean = CLEAN $@
85quiet_cmd_sphinx_clean = CLEAN $@