mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-10 00:12:09 +00:00
exclude BIMI icon and search from Nu validator
This commit is contained in:
parent
ec04df8f2c
commit
679feb8f5c
3 changed files with 18 additions and 7 deletions
4
Makefile
4
Makefile
|
@ -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:
|
||||||
|
|
|
@ -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
17
scripts/vnu.sh
Normal 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"
|
Loading…
Reference in a new issue