Repository navigation
feat: serve per-page Markdown and a curated llms.txt index - #634
Conversation
Expose the docs as Markdown for LLMs and coding agents: - Add /llms.txt, a curated index of key pages with absolute URLs - Support .md per-page URLs (rewritten to the markdown route) alongside the legacy .mdx URLs - Emit absolute page URLs and a shared "text/markdown; charset=utf-8" header across the llms routes - Add e2e coverage for the llms.txt, llms-full.txt, .md and .mdx routes Supporting changes: - Restructure the docs sidebar (Deploy/Configure/Use sections, quick_start) and switch the docs index to DocsHub - Refresh the README and docs contributor guide for the Fumadocs/pnpm stack - Let Playwright target an external base URL via PLAYWRIGHT_BASE_URL
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📦 Next.js Bundle Analysis for librechat.aiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4bc8bb24f1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
An Accept: text/markdown request to a .md/.mdx docs URL hit the content-negotiation branch first, which rewrote the path to the markdown route with the suffix still attached. The route handler then looked up a slug ending in .md and returned 404 instead of letting the next.config rewrite strip the suffix. Move the raw .md/.mdx pass-through ahead of the Accept-based rewrite so suffixed URLs always reach the next.config rewrite, and add an e2e test for a .md request that also sends Accept: text/markdown.
📦 Next.js Bundle Analysis for librechat.aiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Makes the documentation easily consumable by LLMs and coding agents by exposing it as Markdown and adding a curated index.
/llms.txtindex — a hand-picked map of key docs pages (Quick Start, Install, Configuration,librechat.yaml, Agents, MCP, RAG, Auth, env vars, Changelog) with absolute URLs and a per-page Markdown link for each entry..mdper-page URLs —/docs/<path>.mdnow rewrites to the Markdown route, served alongside the existing legacy.mdxURLs (kept for compatibility). The in-page copy/view buttons now point at.md.https://www.librechat.ai/...URLs, and all llms routes return a sharedtext/markdown; charset=utf-8header viaMARKDOWN_RESPONSE_HEADERS.Supporting changes
quick_start, and switched the docs index fromQuickStartHubtoDocsHub.PLAYWRIGHT_BASE_URLlets the suite target an already-running server (skips the managed web server when set).Testing
pnpm typecheck— passespnpm lint— passese2e/llms-routes.spec.tscovering/llms.txt,/llms-full.txt,/docs.md, per-page.md, and legacy.mdxroutes (content-type + body assertions).