Skip to content

feat: add agent-friendly markdown 404 recovery#172

Merged
Kinfe123 merged 3 commits intomainfrom
feat/agent-markdown-404-recovery
May 9, 2026
Merged

feat: add agent-friendly markdown 404 recovery#172
Kinfe123 merged 3 commits intomainfrom
feat/agent-markdown-404-recovery

Conversation

@Kinfe123
Copy link
Copy Markdown
Member

@Kinfe123 Kinfe123 commented May 9, 2026

  • feat: add agent-friendly markdown 404 recovery
  • chore: format

Summary by cubic

Serve agent-friendly markdown 404s and simplify Next routing by removing the markdown bridge route. Markdown detection now honors Signature-Agent, and agents get recovery links while all frameworks reuse the single docs API entrypoint.

  • New Features

    • Added renderDocsMarkdownNotFound() and use it for markdown 404s in @farming-labs/fumadocs API and the astro, nuxt, svelte, and tanstack-start servers.
    • 404 responses are text/markdown with recovery links to /.well-known/agent.json, /api/docs?query={query}, /api/docs?format=markdown[&path=…], and sitemap routes.
    • Markdown detection now treats Signature-Agent as a trigger and sets Vary: Accept, Signature-Agent.
  • Refactors

    • Next: removed the generated /api/docs/markdown bridge; Signature-Agent rewrites now target /api/docs?format=markdown and /api/docs?format=markdown&path=:slug*.
    • Kept a single docs API route; removed related tracing includes and files; updated tests and docs.
    • Minor: updated next-env.d.ts to import ./.next/dev/types/routes.d.ts.

Written for commit 48fd6c9. Summary will update on new commits.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-website Ready Ready Preview, Comment May 9, 2026 9:43pm

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 9, 2026

Open in StackBlitz

@farming-labs/astro

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/astro@172

@farming-labs/astro-theme

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/astro-theme@172

@farming-labs/docs

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/docs@172

@farming-labs/theme

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/theme@172

@farming-labs/next

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/next@172

@farming-labs/nuxt

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/nuxt@172

@farming-labs/nuxt-theme

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/nuxt-theme@172

@farming-labs/svelte

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/svelte@172

@farming-labs/svelte-theme

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/svelte-theme@172

@farming-labs/tanstack-start

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/tanstack-start@172

commit: 48fd6c9

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 16 files

@Kinfe123 Kinfe123 merged commit 75378b5 into main May 9, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant