🐛 Upgrade staticalize to 0.3.0 so the sitemap is valid - #508
Merged
Merged
Conversation
This was referenced Sep 28, 2026
cowboyd
approved these changes
Sep 28, 2026
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 was the first release with it, and 0.3.1 adds the fixes that came out of adopting it. The task takes staticalize from npm rather than jsr. Deno's minimum dependency age refuses a jsr version for its first 24 hours, which would block the task on the day of every staticalize release; npm resolution is not subject to it. The package publishes a `bin` rather than a `/cli` export, so the specifier loses its subpath, and the jsr entry the lockfile was carrying for it goes away with nothing referencing it. 0.3.1 restored the default for `--retries`, so the task does not need to pass it. The workflow keeps its explicit `--concurrency=25` and `--retries=5`, which predate all of this. This site is the one the others name as canonical, so it needs no `--canonical` of its own.
taras
force-pushed
the
fix/staticalize-sitemap-xml
branch
from
September 30, 2026 00:32
3d92780 to
e6179aa
Compare
|
🚀 Deploy Preview Ready!
|
This branch was successfully 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; 0.3.1 adds the fixes that came out of adopting it.
Approach
deno.json— thestaticalizetask moves from 0.2.6 to 0.3.1 on npm.github/workflows/deploy.yaml— the downloaded binary moves from v0.2.7 tov0.3.1, in both the preview and the production job
deno.lock— regenerated for the new versionThe task takes staticalize from npm rather than jsr. Deno's minimum
dependency age refuses a jsr version for its first 24 hours, so a jsr specifier
blocks the task on the day of every staticalize release. npm resolution is not
subject to it. The package publishes a
binrather than a/cliexport, so thespecifier loses its subpath, and the jsr entry the lockfile was carrying goes
away with nothing referencing it.
0.3.0 briefly required
--retries, which was itself a bug(thefrontside/staticalize#19). 0.3.1 restored the default
(thefrontside/staticalize#20), so the task does not pass it. The workflow keeps
its explicit
--concurrency=25and--retries=5, which predate all of this.Two other fixes ride along in 0.3.0, neither of which changes anything here:
--baseis honoured — this site's base ishttps://frontside.com, which has no path--sitestill works, despite--helpnow presenting the site as a positionalargument. I checked rather than assumed.
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
Note on the lockfile
The lock change is now a pure deletion: with the task on npm, nothing references
jsr:@frontside/staticalizeand its 18 lines go. An earlier revision of this PRalso rewrote a few unrelated dependency lists, which is gone.
deno check main.tsxreports type errors on this branch; it reports the sameones on
productionwithout these changes, so they are unrelated and I leftthem alone.
The other consumers have landed
Every site this one proxies was on an affected version and deploying invalid
sitemaps. All three have merged:
--canonical--canonical--canonicalEach of them also moved to
--canonical, so it names this site as the originalrather than claiming its own Netlify origin. This site is the one they name, so
it needs no
--canonicalof its own.That also settles the proxy. Keeping their sitemaps on
--basemeans theentries stay site-relative, so mounting them under
/effection,/interactorsand
/graphgenworks exactly as it always did:An earlier run of this PR failed with 519
/effection/effection/…404s. Thatwas thefrontside/effection#1248 pointing Effection's
--baseatfrontside.com/effection, which is what thefrontside/staticalize#22 andthefrontside/effection#1255 undid. #509 was opened to make the proxy tolerate
it and is no longer needed.