Skip to content

Commit a17b787

Browse files
authored
docs: Adds llms.txt to docs (#47)
1 parent 3ce6e6b commit a17b787

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/**
2+
* Copyright 2025 Google LLC
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
import { getEntries } from "astro:content";
7+
import type { APIRoute } from "astro";
8+
9+
export const GET: APIRoute = async ({ params, request }) => {
10+
const docs = await getEntries([
11+
{ collection: "docs", slug: "reference" },
12+
{ collection: "docs", slug: "reference/frontmatter" },
13+
{ collection: "docs", slug: "reference/picoschema" },
14+
{ collection: "docs", slug: "reference/template" },
15+
{ collection: "docs", slug: "reference/model" },
16+
]);
17+
18+
return new Response(
19+
`=== Dotprompt Template Format Documentation ===\n\nThe following is a complete reference to authoring files using the Dotprompt executable template format. This reference contains only information about the Dotprompt text format, not surrounding language or framework implementations.\n\n${docs
20+
.map((doc) => {
21+
return `# ${doc.data.title} (/${doc.slug})\n\n${doc.body}`;
22+
})
23+
.join("")}`,
24+
{ headers: { "Content-Type": "text/plain; charset=utf-8" } },
25+
);
26+
};

0 commit comments

Comments
 (0)