mirror of
https://github.com/basketikun/infinite-canvas.git
synced 2026-08-04 08:11:14 +08:00
14 lines
429 B
TypeScript
14 lines
429 B
TypeScript
import { getLLMText, source } from '@/lib/source';
|
|
import { readFile } from 'node:fs/promises';
|
|
import { join } from 'node:path';
|
|
|
|
export const revalidate = false;
|
|
|
|
export async function GET() {
|
|
const docsIndex = await readFile(join(process.cwd(), 'index.md'), 'utf8');
|
|
const scan = source.getPages().map(getLLMText);
|
|
const scanned = await Promise.all(scan);
|
|
|
|
return new Response([docsIndex, ...scanned].join('\n\n'));
|
|
}
|