Repository navigation
Refresh site metadata, add structured data, llms.txt, and a Copy page menu - #39
Merged
Merged
Conversation
The CRD reference pages took their meta description from the first line
of a Go doc comment, which wraps at ~80 columns, so every description
stopped mid-sentence ("...defined by: model, system"). mdxutil.Summary
takes the first full sentence instead, capped at a search snippet's
length. CLI family pages now name the command and what the page holds
rather than repeating cobra's bare Short.
Regenerating also brings the AgentSession reference up to date with the
per-pod cost fields and costTreatment, which had drifted from the CRDs.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Site description and landing title match the redesigned hero. - JSON-LD: Organization, WebSite and SoftwareSourceCode on every page, plus TechArticle and BreadcrumbList on each guide. - A share card per guide (section, title, summary) instead of the one site-wide card. - Every guide as Markdown at /docs/<slug>.md, or /docs/<slug> with Accept: text/markdown; /llms.txt indexes them and /llms-full.txt is the whole set. Text responses are noindex with a canonical Link. - pnpm check fails a guide without a description; the 404 page carries one noindex instead of a contradicting pair. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A split button beside each guide's title copies the page as Markdown. Its menu also views the Markdown or opens ChatGPT or Claude with a prompt to read it. The chat links hand over the .md rendition so the model reads the guide without the site chrome. The Markdown is fetched inside the clipboard write (a ClipboardItem promise), since Safari drops the click's clipboard permission across an await. README and AGENTS.md describe the agent-facing features. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
samkim
marked this pull request as ready for review
October 23, 2026 21:25
- The per-guide OG image route sets dynamicParams = false like its siblings, so an unknown slug is a 404 rather than a 500. - guideSource checks the slug names a guide before turning it into a file path, instead of relying on every caller to have checked. - mdxutil.Summary backs a space-free cut off to a rune boundary, and familyDescription capitalizes the first rune rather than the first byte, so neither can emit invalid UTF-8. - guideToMarkdown no longer repeats the title when a body is only its title line. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Summary
The site's metadata had fallen behind the landing-page redesign (#31), and the generated reference pages had broken descriptions. This brings both up to date, adds structured data and per-page share cards, and makes the docs easy for agents and LLM tools to read, including a Copy page menu on every docs page.
Out-of-date metadata, fixed
mdxutil.Summarynow takes the first full sentence, capped at snippet length.costTreatmentalready in the CRDs.SEO
@ida page references is defined on that page (tested).article:section, author/publisher, and googleBotmax-snippet/max-image-previewdirectives.noindexbeside the layout'sindex, follow; it now carries one consistent directive.pnpm checkfails any guide without a description.Agent access
/docs/<slug>.md, and at/docs/<slug>for requests sendingAccept: text/markdown. These arenoindexwith aLink: rel=canonicalto the HTML page./llms.txt(index by section, per llmstxt.org) and/llms-full.txt(every guide in one file).<link rel="alternate" type="text/markdown">on each guide, and an llms.txt link in the footer.site/lib/markdown.ts) is tested against all 136 guides and fails if one uses a component the transform doesn't translate.Copy page menu
A split button beside each guide's title, modeled on the one in the AuthZed docs:
Keyboard: focus moves into the menu on open, arrow keys move between items and wrap, Escape closes and returns focus. The Markdown is fetched inside the clipboard write (a
ClipboardItempromise) because Safari drops a click's clipboard permission across anawait.Screenshots
Copy page menu (dark / light)
After copying, and at phone width
Per-page share cards (previously every page used the site-wide card)
/llms.txtand a page's Markdown (/docs/plan-gating.md)The screenshots were committed and removed in the next commit, so they're linked by commit SHA and the net diff contains none. Squash-merging keeps them out of
main.Testing
Site gate (all passed):
pnpm check,pnpm lint,pnpm typecheck,pnpm test(259 tests),pnpm build(136 pages prerendered and indexed).Generators:
go build ./...,go vet ./pkg/gen/...,go test ./pkg/gen/...passed; new tests formdxutil.Summaryand the CLI family description.Against a production build (
pnpm start):/docs/<slug>.md→ 200text/markdown,X-Robots-Tag: noindex, canonicalLink;Accept: text/markdownon/docs/<slug>→ Markdown, a browserAccept→ HTML; unknown slug.md→ 404./llms.txtlists all 136 guides;/llms-full.txtcontains all 136.pbpastematched/docs/plan-gating.mdbyte for byte (3,848 bytes). Menu keyboard behavior, link targets, the "Copied" reset and the failure state were checked in the browser.Repo ship gate:
mage test:unit: ✅ passedmage test:integration: ⏳ runningmage test:e2e: ⏳ queuedThis PR is a draft until all three finish. The Go changes are limited to
pkg/gen(docs generators).Not covered / follow-ups
generateImageMetadatano params under a dynamic segment at build time, so it can't name the page. The images themselves are per page.Vary: Accept: locally, Next's ownVaryreplaced the configured one on the HTML response. It should be checked on a Vercel preview. Vercel evaluates theAcceptrewrite before its cache either way.🤖 Generated with Claude Code