feat: migrate to nuxt-agent-discovery - #1435
Open
benjamincanac wants to merge 7 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
benjamincanac
marked this pull request as draft
September 2, 2026 13:25
…ilds" This reverts commit 26c1621.
benjamincanac
marked this pull request as ready for review
September 3, 2026 15:14
nuxt-agent-discovery
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
Replace the hand-rolled agent discovery layer with
nuxt-agent-discovery, adopt@nuxtjs/sitemapand publish an OpenAPI document. Markdown negotiation now runs in dev and on every host, not only on Vercel, and every docus site gets the discovery documents for free.Deleted
modules/vercel-markdown-rewrite.ts: the module's Vercel preset writes the same rewrites, O(patterns) instead of one route per page parsed out ofllms.txtmodules/not-found/:errors: trueanswers agents with a markdown body carrying the same recovery links as theLinkheader and the api-catalogmodules/skills/:skills.dirscans the directory and serves/.well-known/skills/server/routes/sitemap.xml.ts:@nuxtjs/sitemapserves it, fed byserver/api/__sitemap__/urls.tswith the same query. On i18n sites it becomes an index with one sitemap per locale and hreflang alternatesapp/utils/prerender.ts: the module hints each twin from the page's own responsegetAgentDocument()andlistAgentPages()modules/config.tsfeeds the module what only the layer knows: the MCP server card from the mcp-toolkit options, the/openapi.jsonlink, and onesitemap.mdsection per locale.docus.skillsanddocus.notFoundkeep working as deprecated aliases.What changes for agents
ClaudeBot,GPTBot, ...) instead ofcurl/*, the same list that feeds therobots.txtallow groups. A barecurlnow gets HTML,Accept: text/markdownand the.mdtwin still get markdown/and/{locale}no longer redirect to/llms.txt, they serve their own markdown, ending with the list of everything the site publishes for agents/openapi.json,/sitemap.md,/.well-known/api-catalog,/.well-known/mcp/server-card.json, agent groups andContent-Signalinrobots.txttitle,descriptionandcanonical_url, and same-origin links are absolutellms.contentRawMarkdownno longer applies,agentDiscovery.excludePrefixesandroutesreplace itDocs updated accordingly, en and fr.
Checks
Build: same 42 HTML routes as
main, 43 raw twins,openapi.jsonandsitemap.mdprerendered, no failed route.Preview: 42 of 42 pages negotiate, every twin static at the CDN with its canonical pair, discovery documents and error bodies as documented, is-agentic 87 against 85 on production.