Skip to content

Commit a6eecc9

Browse files
authored
add llms full route to copy all docs (#62)
1 parent 6a44f40 commit a6eecc9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/app/llms-full.txt/route.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { getLLMText } from '@/lib/get-llm-text';
2+
import { source } from '@/lib/source';
3+
4+
export const revalidate = false;
5+
6+
export async function GET() {
7+
const scan = source.getPages().map(getLLMText);
8+
const scanned = await Promise.all(scan);
9+
10+
return new Response(scanned.join('\n\n'));
11+
}

0 commit comments

Comments
 (0)