diff --git a/Makefile b/Makefile index b3fe287..6139020 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,7 @@ GEMINI_RSYNC_DEST = $(USER):$(GEMINI_ROOT) OUTPUT_DIR = public RSYNCFLAGS += -rlpcv --zc=zstd --zl=6 --skip-compress=gz/br/zst/png/webp/jpg/avif/jxl/mp4/mkv/webm/opus/mp3 +RSYNCFLAGS_EXTRA ?= # compression gets slow for extreme levels like the old "70109" ECT_LEVEL=9 @@ -66,14 +67,14 @@ htmlproofer: htmlproofer $(OUTPUT_DIR) --disable-external --report-invalid-tags --report-missing-names --report-missing-doctype --report-eof-tags --report-mismatched-tags --check-html --check-opengraph --check-favicon --empty-alt-ignore --file-ignore $(OUTPUT_DIR)/search/index.html --url-ignore '../music.txt' linter-configs/htmltest.yml: - rsync $(RSYNCFLAGS) deploy@seirdy.one:/home/deploy/refcache.json linter-configs/htmltest/refcache.json + rsync $(RSYNCFLAGS) $(RSYNCFLAGS_EXTRA) deploy@seirdy.one:/home/deploy/refcache.json linter-configs/htmltest/refcache.json # basic checks for generated HTML and broken links. Persist the broken # link cache remotely so we can run this in CI. .PHONY: htmltest htmltest: linter-configs/htmltest.yml htmltest -c linter-configs/htmltest.yml $(OUTPUT_DIR) - rsync $(RSYNCFLAGS) linter-configs/htmltest/refcache.json deploy@seirdy.one:/home/deploy/refcache.json + rsync $(RSYNCFLAGS) $(RSYNCFLAGS_EXTRA) linter-configs/htmltest/refcache.json deploy@seirdy.one:/home/deploy/refcache.json .PHONY: hint hint: hugo .hintrc-local @@ -122,11 +123,11 @@ mentions.json: hugo .PHONY: deploy-html deploy-html: - rsync $(RSYNCFLAGS) --exclude 'gemini' --exclude '*.gmi' --exclude-from .rsyncignore $(OUTPUT_DIR)/ $(WWW_RSYNC_DEST) --delete + rsync $(RSYNCFLAGS) $(RSYNCFLAGS_EXTRA) --exclude 'gemini' --exclude '*.gmi' --exclude-from .rsyncignore $(OUTPUT_DIR)/ $(WWW_RSYNC_DEST) --delete .PHONY: deploy-gemini deploy-gemini: - rsync $(RSYNCFLAGS) --exclude '*.html' --exclude '*.xml' --exclude '*.xhtml' --exclude '*.gz' --exclude '*.br' --exclude-from .rsyncignore $(OUTPUT_DIR)/gemini/ $(OUTPUT_DIR)/about $(OUTPUT_DIR)/posts $(OUTPUT_DIR)/about $(OUTPUT_DIR)/publickey.* $(GEMINI_RSYNC_DEST)/ --delete + rsync $(RSYNCFLAGS) $(RSYNCFLAGS_EXTRA) --exclude '*.html' --exclude '*.xml' --exclude '*.xhtml' --exclude '*.gz' --exclude '*.br' --exclude-from .rsyncignore $(OUTPUT_DIR)/gemini/ $(OUTPUT_DIR)/about $(OUTPUT_DIR)/posts $(OUTPUT_DIR)/about $(OUTPUT_DIR)/publickey.* $(GEMINI_RSYNC_DEST)/ --delete .PHONY: deploy deploy: deploy-html deploy-gemini diff --git a/scripts/bin/check-whole-site b/scripts/bin/check-whole-site index 6eb3cf9..b547b4f 100755 --- a/scripts/bin/check-whole-site +++ b/scripts/bin/check-whole-site @@ -61,8 +61,9 @@ 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 -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 -j "$jobs" +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 +wait 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' ' ')" # TODO: run lighthouse on every page in the sitemap.