Skip to content

Commit 22ff3fa

Browse files
committed
chore: remove llms-full endpoint and update AI-friendly docs
- drop /llms-full.txt generation and references - describe root markdown access for curl/Accept: text/markdown - adjust site health scenario to match remaining LLM endpoints
1 parent 058d01b commit 22ff3fa

4 files changed

Lines changed: 8 additions & 73 deletions

File tree

lib/llms.ts

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -74,56 +74,3 @@ export async function generateLlmsTxt(): Promise<string> {
7474

7575
return lines.join("\n");
7676
}
77-
78-
/**
79-
* Generate /llms-full.txt content - complete documentation in one file
80-
* Optimized for LLM context windows
81-
*/
82-
export async function generateLlmsFullTxt(): Promise<string> {
83-
const sections: string[] = [
84-
`# ${siteMetadata.name} - Complete Documentation`,
85-
"",
86-
`> ${siteMetadata.description}`,
87-
"",
88-
"---",
89-
"",
90-
];
91-
92-
for (const doc of docPages) {
93-
const content = await Deno.readTextFile(doc.file);
94-
sections.push(
95-
`<!-- Source: ${doc.path}.md -->`,
96-
"",
97-
content.trim(),
98-
"",
99-
"---",
100-
"",
101-
);
102-
}
103-
104-
// Add API Reference section
105-
sections.push("## API Reference", "", "");
106-
107-
const groups = await getPackageGroups();
108-
for (const group of groups) {
109-
sections.push(`### ${group.name}`, "");
110-
for (const pkg of group.packages) {
111-
const desc = await getPackageDescription(pkg.name);
112-
sections.push(`- [\`${pkg.specifier}\`](/api/${pkg.name}.md): ${desc}`);
113-
}
114-
sections.push("");
115-
}
116-
117-
sections.push(
118-
"---",
119-
"",
120-
"## Additional Resources",
121-
"",
122-
`- GitHub: ${siteMetadata.github}`,
123-
`- JSR: ${siteMetadata.jsr}`,
124-
`- Website: ${siteMetadata.baseUrl}`,
125-
"",
126-
);
127-
128-
return sections.join("\n");
129-
}

main.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { serveStatic } from "hono/deno";
33
import { docPages } from "./data/docs.ts";
44
import type { PackageDoc } from "./lib/api-docs.ts";
55
import { generateApiMarkdown } from "./lib/api-markdown.ts";
6-
import { generateLlmsFullTxt, generateLlmsTxt } from "./lib/llms.ts";
6+
import { generateLlmsTxt } from "./lib/llms.ts";
77
import { ApiIndexPage, PackagePage } from "./templates/api/ApiPage.tsx";
88
import { MarkdownDocFromFile } from "./templates/docs/MarkdownDoc.tsx";
99
import { HomePage } from "./templates/home.tsx";
@@ -46,12 +46,6 @@ app.get("/llms.txt", async (c) => {
4646
});
4747
});
4848

49-
app.get("/llms-full.txt", async (c) => {
50-
return c.text(await generateLlmsFullTxt(), 200, {
51-
"Content-Type": "text/markdown; charset=utf-8",
52-
});
53-
});
54-
5549
// Documentation pages (markdown)
5650
for (const doc of docPages) {
5751
app.get(doc.path, async (c) => {

probitas/site-health.probitas.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,6 @@ export default scenario("Probitas docs site health", {
9090
.contentType(/text\/markdown/)
9191
.textContains("## Documentation")
9292
.textContains("## API Reference");
93-
94-
const fullRes = await resources.http.get("/llms-full.txt");
95-
expect(fullRes)
96-
.ok()
97-
.status(200)
98-
.contentType(/text\/markdown/)
99-
.textContains("# Probitas - Complete Documentation")
100-
.textContains("## Additional Resources");
10193
})
10294
.step("renders API index and package JSON", async ({ resources }) => {
10395
const indexRes = await resources.http.get("/api", {

templates/home.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,16 @@ function AiFriendlySection() {
174174
<div class="ai-friendly-card">
175175
<div class="ai-friendly-card-header">
176176
<i class="ti ti-file-stack" />
177-
<span>/llms-full.txt</span>
177+
<span>Root Markdown</span>
178178
</div>
179179
<p>
180-
Complete documentation in a single file. Perfect for loading entire
181-
docs into an LLM's context window.
180+
Access <code>/</code> with <code>curl</code> or an
181+
<code>Accept: text/markdown</code>{" "}
182+
header to get an LLM-friendly Markdown overview. Add{" "}
183+
<code>?human=1</code> for the full HTML page.
182184
</p>
183-
<a href="/llms-full.txt" class="ai-friendly-link">
184-
View llms-full.txt <i class="ti ti-arrow-right" />
185+
<a href="/?human=1" class="ai-friendly-link">
186+
View human homepage <i class="ti ti-arrow-right" />
185187
</a>
186188
</div>
187189

0 commit comments

Comments
 (0)