Repository navigation
feat(tools): publish robots.txt, a sitemap, llms.txt and page metadata - #268
Merged
Merged
Conversation
The site served pages with a title and nothing else for a crawler or an agent: no robots.txt of its own, no sitemap, no llms.txt, no canonical link and no description. assembleSite now emits sitemap.xml from the paths it served, so a page cannot be emitted without being listed (404.html is left out, and no lastmod is written because no page has a truthful date), robots.txt allowing every path and naming the sitemap, and llms.txt linking each family's specification, field reference and alias schema. Every page carries a description, and every page but the not-found page a canonical link to its own sitemap URL. The new files take no _headers rule: Pages types .txt and .xml itself, and no shape rule sets Content-Type on them. Closes #267 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Justin Merrell <merrelljustin@gmail.com>
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.
What changes
The site build (
assembleSite) now emits three discovery files, and every HTML page gets head metadata. No contract change: tooling and docs only./sitemap.xml: every HTML page the build emits, as absolutehttps://specifications.musher.dev/...URLs, derived from the sameservedlist_headersis checked against, so a page cannot be emitted without being listed./404.htmlis left out. No<lastmod>: pages are regenerated on every deploy and no page has a truthful per-page date./robots.txt: allows every path and names the sitemap./llms.txt(llmstxt.org format): H1, blockquote summary, then sections linking each family's specification, field reference and alias JSON Schema, plus the catalog, ledger and repository.page()intools/src/render/html.tsnow takes aPageMeta: every page carries<meta name="description">, and every page but404.htmla<link rel="canonical">to its own sitemap URL._headersrule: Pages types.txtand.xmlitself, no shape rule setsContent-Typeon them, and the/*rule still gives them open CORS.docs/publication.mdlists the new paths.Why
Closes #267
Compatibility
Checklist
task checkpasses locallygit commit -s)Tests in
tools/src/publication/site.test.ts: every emitted HTML page but 404 appears in the sitemap and nothing else does; sitemap shape with nolastmod; robots.txt; llms.txt shape and that every on-origin link it names is served; every page's canonical equals its sitemap URL and carries a description; the discovery files draw noContent-TypeorCache-Controlrule.🤖 Generated with Claude Code