Repository navigation
feat(site): ready for agents: Markdown by content negotiation, JSON-LD, trust pages - #102
Merged
Merged
Conversation
…D, trust pages From an Is Agentic scan (56/100). For the items that apply to a docs site: - Markdown content negotiation and agent-friendly 404s: apps/site/ middleware.ts (Vercel Routing Middleware) answers requests that prefer text/markdown with the page's Markdown copy, a short summary for interactive pages, or a 404 with a Markdown body that links llms.txt and the sitemap; Content-Type text/markdown and Vary: Accept. Browsers get the static pages as before; vercel.json adds Vary: Accept to them. - Every page now has a Markdown copy, including /index.md (written for agents: what Dotquilt is, install, quick start, components, links) and the interactive pages, which say where to open them. - llms.txt says when to use Dotquilt (and when not), and how an agent should add it. - JSON-LD SoftwareApplication on the home page (version read from the core package), og:type website, and an og:image social card (1200x630, the home page's first screen) on every page, through Starlight route middleware. - /about/, /contact/ and /privacy/ pages, linked from the footer. The privacy page states what the site collects: Vercel hosting and cookieless Web Analytics, Google Fonts, the theme choice in local storage. Tests: scripts/site-markdown.test.ts covers the negotiation and the middleware (fetch stubbed); tests/site/discovery.spec.ts covers JSON-LD, the social card, the trust pages, /index.md and llms.txt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Vercel compiles middleware.ts on its own without bundling and runs it in Node, so the import of src/lib/negotiation could not be resolved and every request on the preview failed with MIDDLEWARE_INVOCATION_FAILED. The helpers now live in middleware.ts, and a test compiles it alone and loads it in Node, as Vercel does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dotquilt.dev answered /robots.txt with a 404. It now allows every crawler, as before, and points crawlers and agents to sitemap-index.xml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Summary
Changes from an Is Agentic scan (56/100), for the items that apply to a documentation site.
Vary: AcceptEvidence
scripts/site-markdown.test.ts(11 tests):MIDDLEWARE_INVOCATION_FAILED: Vercel doesn't bundlemiddleware.ts, so its import of a helpers file couldn't be found (ERR_MODULE_NOT_FOUND). This test fails on that version and passes now that the helpers live inmiddleware.ts.*/*and HTML-first don't.fetchstubbed: pass-through for browsers;200 text/markdown+Vary: Acceptfor a page; a summary for an HTML-only page; a Markdown 404; HEAD without a body.tests/site/discovery.spec.ts:og:imageandog:type, canonical andlang;/index.md, the newllms.txtsections, androbots.txt(fails on the old build, where it was a 404).Site tests: 82 passed. Unit tests: 38 passed.
bun run lintandbun run checkpass.On this PR's preview (befc6b7):
/withAccept: text/markdowntext/markdown,Vary: Accept,# Dotquilt/as a browser asks (text/html,…,*/*;q=0.8)text/html,Vary: AcceptHEAD /withtext/markdowntext/markdown, no body/docs/installation/,/docs/components/skeleton/,/about/,/privacy/withtext/markdowntext/markdown, the page/license/,/playground/withtext/markdowntext/markdown, a summary/__probe-404withtext/markdowntext/markdown,# Page not found/__probe-404withtext/html/index.md,/llms.txt,/llms-full.txt,/setup-prompt.md,/sitemap-index.xml,/robots.txt,/og.pngMerge Danger
Door: two-way
Blast Radius: every page's response path
The middleware runs before every page request. It returns early unless the request prefers
text/markdown, and it never runs for files (/_astro, images,.md,.txt). Removingmiddleware.tsturns it off.🤖 Generated with Claude Code