返回 CodeWhale
route.ts
根目录 / web / app / llms-full.txt / route.ts
1 import { RELEASE_DOCS, buildTopicMarkdown } from "@/lib/release-docs";
2 import { buildLlmsTxt } from "@/lib/llms-txt";
3
4 export const dynamic = "force-static";
5
6 export function GET() {
7 const body = [buildLlmsTxt(), ...RELEASE_DOCS.topics.map((document) => buildTopicMarkdown(document.slug))].join("\n\n");
8 return new Response(body, { headers: { "content-type": "text/plain; charset=utf-8", "cache-control": "public, max-age=3600" } });
9 }
10
10 lines TYPESCRIPT