Skip to content

docs: serve markdown to AI agents - #20

Merged
pgajek2 merged 3 commits into
mainfrom
seo/agent-markdown
Oct 26, 2026
Merged

pgajek2 merged 3 commits into
mainfrom
seo/agent-markdown

Conversation

@0ptaq0

@0ptaq0 0ptaq0 commented Oct 25, 2026

Copy link
Copy Markdown
Member

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 with Accept: text/markdown answers with its .md copy, the home page with llms.txt. Pages without a copy fall back to HTML. .md responses get a Link: rel="canonical" header pointing at the HTML page. Adds @vercel/functions (dev dependency, only used by the middleware).
  • VitePress config: every page links its markdown copy with <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), adds Content-Signal: search=yes, ai-input=yes, ai-train=yes and points at llms.txt.

Verified with npm run docs:build: every rel="alternate" link points at a file in the build.

Try it on the preview or after deploy:

curl -H "Accept: text/markdown" https://trigger.beyondthecloud.dev/introduction
curl -I https://trigger.beyondthecloud.dev/introduction.md

@vercel

vercel Bot commented Oct 25, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
trigger-lib Ready Ready Preview Oct 25, 2026 1:11pm UTC

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Salesforce CI

✅ Deployment succeeded

✅ All tests passed

==========================================
     APEX TEST EXECUTION SUMMARY
==========================================

📊 Total Tests: 1305
✅ Passed: 1305
❌ Failed: 0
⏭️  Skipped: 0


🎉 All tests passed successfully!

📦 Workflow run, logs and artifacts


📊 Stats: 1305 total | ✅ 1305 passed | ❌ 0 failed
🤖 Automated comment by Salesforce CI

@pgajek2
pgajek2 merged commit c972526 into main Oct 26, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 40b4ddff Deployed Oct 25, 2026 by vercel[bot]
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.

2 participants