From ed04b8628d57a94af46e1a46d1292c4d93230594 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Sat, 26 Nov 2022 00:16:55 -0800 Subject: [PATCH] Run Nu validator on xhtml Nu updated to flag XHTML-isms. Run on XHTML files so it can default to strict mode. --- Makefile | 3 +-- scripts/bin/check-whole-site | 2 +- scripts/vnu.sh | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 286e1ac..233edd0 100644 --- a/Makefile +++ b/Makefile @@ -174,7 +174,6 @@ lint-and-deploy-staging: .PHONY: deploy-envs deploy-envs: - @$(MAKE) HUGO_FLAGS='' USER=seirdy@envs.net WWW_ROOT=/home/seirdy/public_html GEMINI_ROOT=/home/seirdy/public_gemini HUGO_BASEURL='https://envs.net/~seirdy/' OUTPUT_DIR=public_envs .prepare-deploy + @$(MAKE) -j1 HUGO_FLAGS='' USER=seirdy@envs.net WWW_ROOT=/home/seirdy/public_html GEMINI_ROOT=/home/seirdy/public_gemini HUGO_BASEURL='https://envs.net/~seirdy/' OUTPUT_DIR=public_envs .prepare-deploy copy-to-xhtml @$(MAKE) HUGO_FLAGS='' USER=seirdy@envs.net WWW_ROOT=/home/seirdy/public_html GEMINI_ROOT=/home/seirdy/public_gemini HUGO_BASEURL='https://envs.net/~seirdy/' OUTPUT_DIR=public_envs lint-local - @$(MAKE) HUGO_FLAGS='' USER=seirdy@envs.net WWW_ROOT=/home/seirdy/public_html GEMINI_ROOT=/home/seirdy/public_gemini HUGO_BASEURL='https://envs.net/~seirdy/' OUTPUT_DIR=public_envs copy-to-xhtml @$(MAKE) SSHFLAGS='-o KexAlgorithms=curve25519-sha256@libssh.org' HUGO_FLAGS='' USER=seirdy@envs.net WWW_ROOT=/home/seirdy/public_html GEMINI_ROOT=/home/seirdy/public_gemini HUGO_BASEURL='https://envs.net/~seirdy/' OUTPUT_DIR=public_envs deploy diff --git a/scripts/bin/check-whole-site b/scripts/bin/check-whole-site index 26da1c3..79e16bf 100755 --- a/scripts/bin/check-whole-site +++ b/scripts/bin/check-whole-site @@ -60,7 +60,7 @@ done base_url="${1-http://localhost:8089}" # HTML validation is already parallelized, so run that single-threaded. -make -j1 HUGO_FLAGS=-DF HUGO_BASEURL="$base_url" clean hugo xhtmlize validate-html +make -j1 HUGO_FLAGS=-DF HUGO_BASEURL="$base_url" clean hugo xhtmlize copy-to-xhtml validate-html make -j "$jobs" -f Makefile.online HUGO_BASEURL="$base_url" all-extra URLS="$(curl -sSL "$base_url/sitemap.xml" | htmlq loc -t | rg -v '/search/$' | tr '\n' ' ')" & make deploy-staging RSYNCFLAGS_EXTRA=-q make -f Makefile.online hint-online URLS="$(curl -sSL --compressed https://staging.seirdy.one/sitemap.xml | htmlq loc -t | rg -v '/(?:search|wcag-is-a-starting-point)/$' | sort | tr '\n' ' ')" diff --git a/scripts/vnu.sh b/scripts/vnu.sh index 1c330db..5d0efe0 100644 --- a/scripts/vnu.sh +++ b/scripts/vnu.sh @@ -4,7 +4,7 @@ pwd="$(dirname "$0")" output_dir="$1" files_to_analyze() { - find "$output_dir" -type f -name '*.html' -o -name '*.svg' \ + find "$output_dir" -type f -name '*.xhtml' -o -name '*.svg' \ | grep -Ev '(bimi\.svg|search/index\.x?html)$' }