Repository navigation
fix(web): make the site legible to agents - #6
Merged
Merged
Conversation
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.
npx is-agentic benday.kacemmathlouthi.devscored the site 71/100: one essential failure, three recommended failures, four partials. This addresses everything that is fixable in this repository.Markdown, for agents that would rather not parse HTML
Every route now builds a
.mdtwin beside its HTML.vercel.jsonrewrites the page URL to it when the request accepts markdown, withVary: Acceptso a CDN cannot hand the HTML variant to a client that asked for markdown, and a<link rel="alternate" type="text/markdown">points at the same file for clients that do not negotiate.The prose lives in
apps/web/content/*.md, but the preset catalogue and the prop table are substituted at build time fromPRESETSand the rows the usage page renders, so the two representations cannot disagree about a default. That is why the prop table moved intosrc/lib/api.ts.llms.txtis generated alongside, and leads with when to reach for benday and when not to.Pages that say who is behind this
/about,/contactand/privacy. Privacy states what is true rather than what is customary: no analytics, no cookies, onelocalStoragekey for the theme, the dropped logo never leaving the tab, and the one third-party request the site does make (the GitHub avatar in the footer).Content a crawler can read
The homepage carried 1.7KB of prose inside 55KB of markup, most of it 21 live canvases. A short "How it works" section above the footer roughly doubles the readable text. The 404, which is served on every unknown URL, now lists every real page plus
llms.txt, the sitemap and the registry payload in its body.The homepage structured data described the author better than the project, so parsers picked out the
Person. It now leads withSoftwareApplication, with thePersonlinked by@idcarryingurlandsameAs.Two bugs found on the way
turbo.jsonexcluded**/*.mdfrom the build hash. Now thatcontent/*.mdis a build input, a markdown-only edit was a cache hit and would have shipped stale pages. Narrowed to!*.md, which still keeps package-root READMEs and CHANGELOGs out.vite devanswered/llms.txt,/sitemap.xmland every.mdwith the SPA shell, which routes to the 404. The builders moved intosrc/lib/feeds.tsand a dev-only plugin serves them from the same module; output is byte-identical to the build.Not addressed
Brand-name discoverability is off-site. The 404 stays HTML-only: serving it as markdown would mean either a 200, which tells agents every path exists, or a serverless function on an otherwise static site.
Summary by cubic
Serve markdown twins for every page and add an agent index so tools can consume the docs without parsing HTML. Also fix markdown-only cache misses and surface feeds in dev.
Build outputs now include
*.mdper route,llms.txt, andsitemap.xml.vercel.jsonrewritesAccept: text/markdownrequests to the page’s.mdtwin and setsVary: Accept;<link rel="alternate" type="text/markdown">is added to each page’s head.Move feed builders into
src/lib/feeds.tsand add a dev-only Vite plugin to serve.md,llms.txt, andsitemap.xmlbyte-identically duringvitedev. The SPA shell no longer swallows these URLs locally.Generate structured data that leads with
SoftwareApplication(and links thePersonby@id) so parsers identify the project, not only the author.Add
/about,/contact, and/privacy; link them in the footer; expand the homepage with a short “How it works”; update the 404 to list all real pages plusllms.txt, the sitemap, and the registry payload.Unify the API prop table in
src/lib/api.ts; the usage page and the markdown twin both render from the same source to avoid drift. Preset listings for markdown come from the runtimePRESETS.Centralize off-site URLs in
src/lib/links.tsto keep references consistent across pages, footer, and structured data.Fix build caching:
turbo.jsonnow ignores only package-root*.mdso edits inapps/web/content/*.mdinvalidate the build.Migration for new routes:
PAGESinsrc/lib/seo.tsand create matching prose atapps/web/content/<file>.md(the prerender fails if missing).apps/web/vercel.jsonand the rootvercel.json.Written for commit 795b8f5. Summary will update on new commits.