From 0f9e30e3f9229015df8e9df2ea63a338a81b931a Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Thu, 2 Jul 2026 13:22:12 +0200 Subject: [PATCH] [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 --- utils/lib.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/utils/lib.sh b/utils/lib.sh index 4ae50c31f..3ab0e12d8 100755 --- a/utils/lib.sh +++ b/utils/lib.sh @@ -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 $? }