1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-23 21:02:09 +00:00
seirdy.one/scripts/vnu.sh
Rohan Kumar ed04b8628d
Run Nu validator on xhtml
Nu updated to flag XHTML-isms. Run on XHTML files so it can default to
strict mode.
2022-11-26 00:16:55 -08:00

17 lines
395 B
Bash

#!/bin/sh
set -e -u
pwd="$(dirname "$0")"
output_dir="$1"
files_to_analyze() {
find "$output_dir" -type f -name '*.xhtml' -o -name '*.svg' \
| grep -Ev '(bimi\.svg|search/index\.x?html)$'
}
# we skip the BIMI icon (VNU can't handle SVG 1.2) and the search page (it has raw templates).
vnu \
--stdout \
--format json \
--also-check-svg \
$(files_to_analyze) \
| sh "$pwd/filter-vnu.sh"