UNPKG

starlight-llms-txt

Version:

Generate llms.txt files to train large language models on your Starlight documentation website

15 lines (13 loc) 458 B
import type { APIRoute } from 'astro'; import { generateLlmsTxt } from './generator'; import { getSiteTitle } from './utils'; /** * Route that generates a single plaintext Markdown document from the full website content. */ export const GET: APIRoute = async (context) => { const body = await generateLlmsTxt(context, { minify: false, description: `This is the full developer documentation for ${getSiteTitle()}`, }); return new Response(body); };