diff --git a/sphinx/sphinx-finished.sh b/sphinx/sphinx-finished.sh new file mode 100755 index 000000000..83a670a72 --- /dev/null +++ b/sphinx/sphinx-finished.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: BSD-2 + +# +# This script is configured to run as part of the sphinx build +# through API events registered in conf.py. +# This script runs on event build-finished. +# +# This would be better served by handling the events +# html-collect-page --> for add .nojekyll +# html-page-context --> for fixing the span's done with sed. +# +# For the case of time, we just left this script as is and run it as a +# post sphinx build command event :-p +# + +set -eo pipefail + +find "${SPHINX_OUTDIR}" -name \*.html -exec \ + sed -i 's/\&\#/\&\#/g' {} \; +touch "${SPHINX_OUTDIR}"/.nojekyll + +exit 0