From 69acc1eb3609eb066b39919cb5c161493377dd00 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Sat, 11 Jul 2026 23:37:47 -0400 Subject: [PATCH] feat(astro): add API routes for llms full and index text exports --- src/pages/llms-full.txt.ts | 7 +++++++ src/pages/llms.txt.ts | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 src/pages/llms-full.txt.ts create mode 100644 src/pages/llms.txt.ts diff --git a/src/pages/llms-full.txt.ts b/src/pages/llms-full.txt.ts new file mode 100644 index 0000000..4de3e11 --- /dev/null +++ b/src/pages/llms-full.txt.ts @@ -0,0 +1,7 @@ +import type { APIRoute } from "astro"; +import { buildLlmsFull } from "@/data/llms"; + +export const GET: APIRoute = async () => + new Response(await buildLlmsFull(), { + headers: { "Content-Type": "text/plain; charset=utf-8" }, + }); diff --git a/src/pages/llms.txt.ts b/src/pages/llms.txt.ts new file mode 100644 index 0000000..fc6cdc6 --- /dev/null +++ b/src/pages/llms.txt.ts @@ -0,0 +1,7 @@ +import type { APIRoute } from "astro"; +import { buildLlmsIndex } from "@/data/llms"; + +export const GET: APIRoute = async () => + new Response(await buildLlmsIndex(), { + headers: { "Content-Type": "text/plain; charset=utf-8" }, + });