🐛 Write sitemap entries as <url> - #15
Merged
Merged
Conversation
The suite bound deno's default port 8000, so it failed with `AddrInUse` whenever anything else on the machine was already listening there.
The sitemap writer passed `urls` as the entry key, so every generated sitemap wrapped its `<loc>` in `<urls>` and was invalid per https://www.sitemaps.org/protocol.html. It went unnoticed because our own reader accepts either spelling, so a site staticalized twice round-trips its own invalid output. The reader keeps accepting `urls` so sitemaps already deployed by earlier versions can still be crawled. Closes #14
This was referenced Sep 26, 2026
cowboyd
approved these changes
Sep 26, 2026
cowboyd
left a comment
Member
There was a problem hiding this comment.
will this require fixes of our current deployments?
Member
Author
|
@cowboyd yes, I think so |
This was referenced Sep 28, 2026
taras
added a commit
to thefrontside/frontside.com
that referenced
this pull request
Sep 30, 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.
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
Closes #14.
The sitemap staticalize writes wraps every
<loc>in<urls>rather than<url>, so it is invalid per the sitemaps.org schema — the deployed Effection sitemap hands crawlers 519 malformed entries.It went unnoticed because our own reader accepts either spelling (
xml.urlset.url ?? xml.urlset.urls), so a site staticalized twice round-trips its own invalid output.Approach
The entry key passed to
stringifyinstaticalize.tsis nowurl.The reader keeps accepting
urls— sitemaps that earlier versions already deployed should stay crawlable by staticalize itself.The test asserted the malformed spelling (
xml.urlset.urls), which is what let this ship; it now readsxml.urlset.urland also asserts the raw body contains no<urls>.Separate first commit: the test server bound Deno's default port 8000, so the whole suite failed with
AddrInUsewhenever anything else on the machine was listening there. It now passesport: 0and takes the port the OS hands back.