From 28f833069df099716b8f249878d2d297b8c67bcb Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Wed, 17 Aug 2022 13:50:33 -0700 Subject: [PATCH] update to vent, add validation --- Makefile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cb1747b..7d99ef2 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,22 @@ .PHONY: env +VNU_RELEASE=20.6.30 +VNU_URL=https://github.com/validator/validator/releases/download/$(VNU_RELEASE)/vnu.jar_$(VNU_RELEASE).zip + +vnu.jar_$(VNU_RELEASE).zip: + wget $(VNU_URL) + +vnu.jar: vnu.jar_$(VNU_RELEASE).zip + unzip -p $< dist/vnu.jar > $@ || (rm "$@"; false) + +.PHONY: validate +validate: vnu.jar + hyde gen + java -jar vnu.jar --also-check-css --stdout $$(find deploy -name '*.html' -o -name '*.css') | egrep -v 'Section lacks heading|Article lacks heading|Consider using the “h1” element as a top-level heading only' || true + #java -jar vnu.jar --svg --stdout $$(find deploy -name '*.svg') | egrep -v 'The value of attribute “unicode” on element “glyph” from namespace “http://www.w3.org/2000/svg” is not in Unicode Normalization Form C.' || true + env: - (virtualenv p && . ./p/bin/activate && pip install -r requirements.txt) + (python3 -m venv p && . ./p/bin/activate && pip install -r requirements.txt) .PHONY: deploy