Files
better-auth/docs/app/llms.txt/route.ts
T
RobiandGitHub 0c4583c015 docs: add LLM copy button and view options components (#3423)
* feat: add LLM copy button and view options components
- update routing for LLM text generation, adding .mdx to a route now generates its .md repsresentation
- add rewrite from /docs/:path*mdx to /llms.txt/:path so ai can traverse the llms.txt as routes

* chore: lint

* chore: cubic
2025-07-17 01:16:04 -07:00

15 lines
352 B
TypeScript

import { source } from "@/lib/source";
import { getLLMText } from "../docs/lib/get-llm-text";
export const revalidate = false;
export async function GET() {
const scan = source
.getPages()
.filter((file) => file.slugs[0] !== "openapi")
.map(getLLMText);
const scanned = await Promise.all(scan);
return new Response(scanned.join("\n\n"));
}