1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-27 14:12:09 +00:00

exclude BIMI icon and search from Nu validator

This commit is contained in:
Rohan Kumar 2022-08-13 14:05:16 -07:00
parent ec04df8f2c
commit 679feb8f5c
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
3 changed files with 18 additions and 7 deletions

View file

@ -18,8 +18,6 @@ RSYNCFLAGS_EXTRA ?=
# compression gets slow for extreme levels like the old "70109" # compression gets slow for extreme levels like the old "70109"
ECT_LEVEL=9 ECT_LEVEL=9
VNU ?= vnu
csv/webrings.csv: csv/webrings.csv:
sh scripts/populate-webrings.sh sh scripts/populate-webrings.sh
@ -60,7 +58,7 @@ validate-json:
.PHONY: validate-html .PHONY: validate-html
validate-html: validate-html:
$(VNU) --stdout --format json --skip-non-html --also-check-svg $(OUTPUT_DIR) | sh scripts/filter-vnu.sh sh scripts/vnu.sh $(OUTPUT_DIR)
.PHONY: htmlproofer .PHONY: htmlproofer
htmlproofer: htmlproofer:

View file

@ -21,10 +21,6 @@
( # see https://github.com/w3c/css-validator/issues/370 ( # see https://github.com/w3c/css-validator/issues/370
.message == "CSS: “contain”: “inline-size” is not a “contain” value." .message == "CSS: “contain”: “inline-size” is not a “contain” value."
) )
or
( # the search page has raw templates, let those slide. I validate the final dynamic search page manually.
.url | test ("/search/index.")
)
) | not ) | not
) )
) | del(..|select(. == [])) | del(..|select(. == {})) | select(. != null) ) | del(..|select(. == [])) | del(..|select(. == {})) | select(. != null)

17
scripts/vnu.sh Normal file
View file

@ -0,0 +1,17 @@
#!/bin/sh
set -e -u
pwd="$(dirname "$0")"
output_dir="$1"
files_to_analyze() {
find "$output_dir" -type f -name '*.html' -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"