docs: add llms

This commit is contained in:
Carl-Gerhard Lindesvärd
2026-02-09 21:46:09 +00:00
parent 40a3178b57
commit 9f441fd9fa
11 changed files with 330 additions and 10 deletions

View File

@@ -1,10 +1,27 @@
import {
OPENPANEL_BASE_URL,
OPENPANEL_DESCRIPTION,
OPENPANEL_NAME,
} from '@/lib/openpanel-brand';
import { getLLMText, source } from '@/lib/source';
export const revalidate = false;
export const dynamic = 'force-static';
const header = `# ${OPENPANEL_NAME} Full documentation for LLMs
${OPENPANEL_DESCRIPTION}
This file contains the full text of all documentation pages. Each section is separated by --- and includes a canonical URL.
`;
export async function GET() {
const scan = source.getPages().map(getLLMText);
const scanned = await Promise.all(scan);
const pages = source.getPages().slice().sort((a, b) => a.url.localeCompare(b.url));
const scanned = await Promise.all(pages.map(getLLMText));
return new Response(scanned.join('\n\n'));
return new Response(header + scanned.join('\n\n'), {
headers: {
'Content-Type': 'text/plain; charset=utf-8',
},
});
}