diff --git a/.github/workflows/sanity.yml b/.github/workflows/sanity.yml index 330c754aa42..372d6597e92 100644 --- a/.github/workflows/sanity.yml +++ b/.github/workflows/sanity.yml @@ -8,8 +8,6 @@ on: push: branches: [ "*" ] paths-ignore: - - 'docs/**' - - '!docs/log-message-tags/**' - STATUS - CHANGES - README* @@ -18,8 +16,6 @@ on: pull_request: branches: [ "trunk", "2.4.x" ] paths-ignore: - - 'docs/**' - - '!docs/log-message-tags/**' - STATUS - CHANGES - README* @@ -54,3 +50,14 @@ jobs: sudo apt-get install -o Acquire::Retries=5 libapr1-dev libaprutil1-dev - name: Check for autoconf warnings run: ./buildconf --with-apr=/usr/bin/apr-1-config --with-errors + + docs: + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@v6 + - name: Install prerequisites + run: sudo apt-get -o Acquire::Retries=5 update && + sudo apt-get install -o Acquire::Retries=5 libxml2-utils w3c-sgml-lib + - name: Check docs XML + run: ./test/gha-docs-check.sh diff --git a/docs/manual/rewrite/avoid.xml.ko b/docs/manual/rewrite/avoid.xml.ko index c9104a7ef45..fab426237e9 100644 --- a/docs/manual/rewrite/avoid.xml.ko +++ b/docs/manual/rewrite/avoid.xml.ko @@ -1,4 +1,4 @@ - + diff --git a/docs/manual/rewrite/flags.xml.ko b/docs/manual/rewrite/flags.xml.ko index 6775845cf2c..8bad4db10c7 100644 --- a/docs/manual/rewrite/flags.xml.ko +++ b/docs/manual/rewrite/flags.xml.ko @@ -1,4 +1,4 @@ - + diff --git a/docs/manual/rewrite/htaccess.xml.ko b/docs/manual/rewrite/htaccess.xml.ko index 4a785f67ab6..8bfb7e70648 100644 --- a/docs/manual/rewrite/htaccess.xml.ko +++ b/docs/manual/rewrite/htaccess.xml.ko @@ -1,4 +1,4 @@ - + diff --git a/docs/manual/rewrite/index.xml.ko b/docs/manual/rewrite/index.xml.ko index 79f85e4ada1..3c52bf96ef5 100644 --- a/docs/manual/rewrite/index.xml.ko +++ b/docs/manual/rewrite/index.xml.ko @@ -1,4 +1,4 @@ - + diff --git a/docs/manual/rewrite/intro.xml.ko b/docs/manual/rewrite/intro.xml.ko index bdf58efcb8a..70905e23b1d 100644 --- a/docs/manual/rewrite/intro.xml.ko +++ b/docs/manual/rewrite/intro.xml.ko @@ -1,4 +1,4 @@ - + diff --git a/docs/manual/rewrite/remapping.xml.ko b/docs/manual/rewrite/remapping.xml.ko index 1eb0b4784bc..156ba256e31 100644 --- a/docs/manual/rewrite/remapping.xml.ko +++ b/docs/manual/rewrite/remapping.xml.ko @@ -1,4 +1,4 @@ - + diff --git a/docs/manual/rewrite/rewritemap.xml.ko b/docs/manual/rewrite/rewritemap.xml.ko index 554721a3b23..fcb9d28ea54 100644 --- a/docs/manual/rewrite/rewritemap.xml.ko +++ b/docs/manual/rewrite/rewritemap.xml.ko @@ -1,4 +1,4 @@ - + diff --git a/docs/manual/rewrite/tech.xml.ko b/docs/manual/rewrite/tech.xml.ko index 8d1487214c2..c650de82149 100644 --- a/docs/manual/rewrite/tech.xml.ko +++ b/docs/manual/rewrite/tech.xml.ko @@ -1,4 +1,4 @@ - + diff --git a/docs/manual/rewrite/vhosts.xml.ko b/docs/manual/rewrite/vhosts.xml.ko index feebdfabc68..89952dd79f2 100644 --- a/docs/manual/rewrite/vhosts.xml.ko +++ b/docs/manual/rewrite/vhosts.xml.ko @@ -1,4 +1,4 @@ - + diff --git a/docs/manual/style/lang/ko.xml b/docs/manual/style/lang/ko.xml index fa4ec120cfb..d1e716a9d7c 100644 --- a/docs/manual/style/lang/ko.xml +++ b/docs/manual/style/lang/ko.xml @@ -96,7 +96,7 @@ Experimental External - 사용 중단됨 + ߴܵ ּ diff --git a/test/gha-docs-check.sh b/test/gha-docs-check.sh new file mode 100755 index 00000000000..d339d165b8b --- /dev/null +++ b/test/gha-docs-check.sh @@ -0,0 +1,46 @@ +#!/bin/sh +# +# Check the XML sources of the manual: every file must be well-formed, +# and every file with a DOCTYPE must be valid against its DTD. Pass +# file names to check only those, otherwise all of docs/ is checked. +# +# The DTDs pull in the XHTML entity sets by public identifier, so these +# must be resolvable from an XML catalog (on Debian/Ubuntu, install +# w3c-sgml-lib; on Fedora, xhtml1-dtds, or point XML_CATALOG_FILES at +# a catalog); nothing is fetched from the network. + +cd "`dirname "$0"`/.." || exit 1 + +if ! command -v xmllint >/dev/null; then + echo "FAIL: xmllint not found" + exit 1 +fi + +if [ $# -eq 0 ]; then + set -- `find docs -name '*.xml' -o -name '*.xml.*' | sort` +fi + +rv=0 +count=0 + +for f in "$@"; do + count=$((count + 1)) + # The language files use lang.dtd only to define entities, and + # declare no elements, so can only be checked for well-formedness. + if grep -q '&1` \ + || echo "$out" | grep -q 'failed to load external entity'; then + echo "$out" + echo "FAIL: $f" + rv=1 + fi +done + +[ $rv -eq 0 ] && echo "PASS: $count files checked" + +exit $rv