Repository navigation
docs: serve markdown to AI agents - #20
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
🚀 Salesforce CI✅ Deployment succeeded✅ All tests passed📦 Workflow run, logs and artifacts 📊 Stats: 1305 total | ✅ 1305 passed | ❌ 0 failed |
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.
AI agents (ChatGPT, Claude, Perplexity, coding agents like Claude Code or Cursor) read markdown much better than rendered HTML. vitepress-plugin-llms already builds a markdown copy of every docs page (
/page.md); this makes agents find it and get it without guessing.Changes:
middleware.js(Vercel Routing Middleware): a page requested withAccept: text/markdownanswers with its.mdcopy, the home page withllms.txt. Pages without a copy fall back to HTML..mdresponses get aLink: rel="canonical"header pointing at the HTML page. Adds@vercel/functions(dev dependency, only used by the middleware).<link rel="alternate" type="text/markdown">(home page:llms.txt).robots.txt: names the OpenAI, Anthropic and Perplexity crawlers next to*(same rules, everything allowed), addsContent-Signal: search=yes, ai-input=yes, ai-train=yesand points at llms.txt.Verified with
npm run docs:build: everyrel="alternate"link points at a file in the build.Try it on the preview or after deploy: