Skip to content

docs: serve markdown to AI agents - #336

Merged
0ptaq0 merged 3 commits into
mainfrom
seo/agent-markdown
Oct 27, 2026
Merged

0ptaq0 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. This gives every docs page a markdown copy and makes agents find it.

Changes in website/:

  • generateMarkdownFiles: true in docusaurus-plugin-llms: a .md copy of each current doc page next to it in the build (/soql/api/soql.md), and llms.txt now links those copies.
  • plugins/llms-markdown.js wraps the plugin: after the copies are written, every page that has one gets <link rel="alternate" type="text/markdown">, the home page one to llms.txt. Wrapping keeps the order, Docusaurus runs postBuild hooks in parallel. Versioned pages (6.12.0) get no copy and no link.
  • middleware.js (Vercel Routing Middleware, website/ is the project root): 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. Adds @vercel/functions (dev dependency).
  • robots.txt: names the OpenAI, Anthropic and Perplexity crawlers next to * (same rules), adds Content-Signal: search=yes, ai-input=yes, ai-train=yes and points at llms.txt.

Checked with npm run build (54 pages linked, every link points at a file in the build) and on the Vercel preview: .md and Accept: text/markdown return markdown, browsers still get HTML.

curl -H "Accept: text/markdown" https://soql.beyondthecloud.dev/soql/api/soql
curl -I https://soql.beyondthecloud.dev/soql/api/soql.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
soql.beyondthecloud.dev Ready Ready Preview Oct 25, 2026 1:11pm UTC

Request Review

@github-actions

Copy link
Copy Markdown

🚀 Salesforce CI

✅ Deployment succeeded

✅ All tests passed

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

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


🎉 All tests passed successfully!

📦 Workflow run, logs and artifacts


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

@codecov

codecov Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.82%. Comparing base (e8229dd) to head (3043326).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #336   +/-   ##
=======================================
  Coverage   98.82%   98.82%           
=======================================
  Files           4        4           
  Lines        2208     2208           
=======================================
  Hits         2182     2182           
  Misses         26       26           
Flag Coverage Δ
Apex 98.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@0ptaq0
0ptaq0 merged commit 8545890 into main Oct 27, 2026
5 checks passed

This branch was successfully deployed

1 active deployment
Preview — 30433262 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.

1 participant