🐛 Upgrade staticalize to 0.3.0 so the sitemap is valid - #73
Merged
Merged
Conversation
Every sitemap this site has deployed wraps each `<loc>` in `<urls>` rather than `<url>`, which is not the sitemaps.org schema. Crawlers are handed a document whose entries they have no reason to understand. It went unnoticed because staticalize's own reader accepts either spelling, so a site staticalized twice round-trips its own invalid output. thefrontside/staticalize#15 fixes the writer; 0.3.0 is the first release with it. 0.3.0 requires `--retries`, where 0.2.6 applied a default of 3. The task did not pass it, so it passes 3 now and keeps the behaviour it had.
cowboyd
approved these changes
Sep 28, 2026
This was referenced Sep 28, 2026
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Every sitemap this site has deployed is invalid. Staticalize wraps each
<loc>in
<urls>rather than<url>, which is not thesitemaps.org schema, so crawlers are
handed a document whose entries they have no reason to understand.
It went unnoticed because staticalize's own reader accepts either spelling
(
xml.urlset.url ?? xml.urlset.urls), so a site staticalized twice round-tripsits own invalid output. thefrontside/staticalize#14 has the details;
thefrontside/staticalize#15 fixes the writer, and 0.3.0 is the first release
that carries it.
One of four sites in the org on an affected version — see the table at the
bottom.
Approach
One line: the
staticalizetask indeno.jsonmoves from 0.2.6 to 0.3.0. Bothdeploy jobs run
deno task staticalize, so the workflow needs no change, andnothing in
deno.lockreferences the package — the task names the fulljsr:url, so it is not an import map entry.
0.3.0 requires
--retries, where 0.2.6 applied a documented default of 3.The task did not pass it, so it would have started failing outright:
It now passes
--retries=3, which is the value it was already getting. Thatrequirement is itself a bug (thefrontside/staticalize#19), already fixed by
thefrontside/staticalize#20 but not yet released — once it ships, the flag can
come back out.
Two other fixes ride along in 0.3.0:
--baseis honoured — this site's base ishttps://graphgen-data.netlify.app, which has no path, so nothing changesThat second one is the only place this could have interacted with
fix-static-css.ts, so I read it: it walks.htmlfiles and replaces Twind CSSand state, and does not touch urls. The two do not overlap.
Tests
Served a two-page site with a valid sitemap and staticalized it with both
versions:
0.2.6, what this site runs today
0.3.0, this PR
I also checked that
--sitestill works, since 0.3.0's--helpnow presents thesite as a positional argument. It does; no caller needs changing.
Other sites that need the same bump