[fix] docs.live (sphinx-autobuild) - watch .rst, .py, .yml and .conf (#6348)

So far, any change to any file triggered a new build, and changes to the
doc-strings (in ./searx) were not taken into account. With this patch, a build
is only triggered when files with the specified file extensions change.

The watch has been expanded to ./searx so that changes to doc strings also
trigger a new build.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser
2026-07-02 13:22:12 +02:00
committed by GitHub
parent 640f88c9bd
commit 0f9e30e3f9

View File

@@ -776,8 +776,11 @@ docs.live() {
pyenv.install
docs.prebuild
# shellcheck disable=SC2086
PATH="${PY_ENV_BIN}:${PATH}" pyenv.cmd sphinx-autobuild \
${SPHINX_VERBOSE} ${SPHINXOPTS} --open-browser --host 0.0.0.0 \
SPHINX_AUTOBUILD_DEBUG=1 PATH="${PY_ENV_BIN}:${PATH}" pyenv.cmd sphinx-autobuild \
${SPHINX_VERBOSE} ${SPHINXOPTS} \
--watch ./searx \
--re-ignore '(^|/)\.#|^(?!.*\.(rst|py|yml)$).*'\
--open-browser --host 0.0.0.0 \
-b html -c ./docs -d "${DOCS_BUILD}/.doctrees" ./docs "${DOCS_DIST}"
dump_return $?
}