Skip to content

Commit

Permalink
added llms.txt files under docs directory (#3446)
Browse files Browse the repository at this point in the history
* added llms.txt files under docs directory

* satisfy eslint
  • Loading branch information
mooreds authored Dec 27, 2024
1 parent 6d43cfb commit b73051a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions astro/src/pages/docs/llms-full.txt.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { getCollection } from "astro:content";
import type { APIRoute } from "astro";

const docs = await getCollection("docs");

export const GET: APIRoute = async ({}) => {
return new Response(
`## FusionAuth.io Full Documentation\n\n${docs
.map((doc) => {
return `# ${doc.data.title}\n\n${doc.body}\n\n`;
})
.join("")}`,
{ headers: { "Content-Type": "text/plain; charset=utf-8" } }
);
};
15 changes: 15 additions & 0 deletions astro/src/pages/docs/llms.txt.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { getCollection } from "astro:content";
import type { APIRoute } from "astro";

const docs = await getCollection("docs");

export const GET: APIRoute = async ({}) => {
return new Response(
`## FusionAuth.io Documentation\n\n${docs
.map((doc) => {
return `- [${doc.data.title}](https://fusionauth.io/docs/${doc.slug}/)\n`;
})
.join("")}`,
{ headers: { "Content-Type": "text/plain; charset=utf-8" } }
);
};

0 comments on commit b73051a

Please sign in to comment.