From 79e89df34083f78a6ab32c2e8e5b0485459b278d Mon Sep 17 00:00:00 2001 From: Dima Tisnek Date: Thu, 29 Aug 2024 12:07:00 +0900 Subject: [PATCH] docs: Live reload with sphinx-autobuild (#1323) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - [x] it works 🎉 - [x] sphinx-autobuild was already included in pyproject.toml, was there already a way to rebuild on change? - [x] let's paint that bike shed and decide on the `tox -e ` for this --- tox.ini | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tox.ini b/tox.ini index 7c08c93f1..72a4c6256 100644 --- a/tox.ini +++ b/tox.ini @@ -49,6 +49,16 @@ commands_pre = commands = sphinx-build -W --keep-going docs/ docs/_build/html +[testenv:docs-live] +description = Live development: build the Sphinx docs with autoreloading enabled +deps = {[testenv:docs]deps} +commands_pre = + {[testenv:docs]commands_pre} +# https://github.com/sphinx-doc/sphinx-autobuild/issues/170 +change_dir = {tox_root}/docs +commands = + sphinx-autobuild ./ ./_build/html --watch . --port 8000 + [testenv:fmt] description = Apply coding style standards to code deps =