Skip to content
27 changes: 25 additions & 2 deletions _config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,14 @@ site.addEventListener("afterBuild", async () => {
const { default: generateModule } = await import(
"./generate_llms_files.ts"
);
const { collectFiles, generateLlmsTxt, generateLlmsFullTxt } =
generateModule;
const {
collectFiles,
generateLlmsTxt,
generateLlmsSummaryTxt,
generateLlmsFullTxt,
generateLlmsJson,
loadOramaSummaryIndex,
} = generateModule;

log.info("Generating LLM-friendly documentation files...");

Expand All @@ -204,10 +210,27 @@ site.addEventListener("afterBuild", async () => {
Deno.writeTextFileSync(site.dest("llms.txt"), llmsTxt);
log.info("Generated llms.txt in site root");

// Generate llms-summary.txt
const llmsSummaryTxt = generateLlmsSummaryTxt(files);
Deno.writeTextFileSync(site.dest("llms-summary.txt"), llmsSummaryTxt);
log.info("Generated llms-summary.txt in site root");

// Generate llms-full.txt
const llmsFullTxt = generateLlmsFullTxt(files);
Deno.writeTextFileSync(site.dest("llms-full.txt"), llmsFullTxt);
log.info("Generated llms-full.txt in site root");

// Generate llms.json
const oramaSummary = await loadOramaSummaryIndex();
if (oramaSummary) {
const llmsJson = generateLlmsJson(oramaSummary);
Deno.writeTextFileSync(site.dest("llms.json"), llmsJson);
log.info("Generated llms.json in site root");
} else {
log.warn(
"Skipped llms.json generation (orama-index-summary.json not found)",
);
}
} catch (error) {
log.error("Error generating LLMs files:" + error);
}
Expand Down
25 changes: 25 additions & 0 deletions ai/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: "AI entrypoint"
description: "Overview and key resources for LLMs and AI agents using the Deno docs"
url: /ai/
---

This page is a short entrypoint for LLMs and AI agents consuming the Deno
documentation.

## Key resources

- [llms-summary.txt](/llms-summary.txt): compact, high-signal index
- [llms.txt](/llms.txt): full section index
- [llms.json](/llms.json): structured index (Orama summary)
- [llms-full.txt](/llms-full.txt): full content dump (large)
- [Site search](/): use the on-site search UI for human browsing

## Usage notes

- Prefer `llms-summary.txt` for quick orientation; fall back to `llms.txt` for
breadth.
- Use `llms.json` when you need structured metadata (category, section,
docType).
- `llms-full.txt` is large; only fetch it when you need full-text extraction.
- When possible, follow canonical URLs for stable citations.
2 changes: 1 addition & 1 deletion examples/tutorials/tunnel_database.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "title: Connect a Database to your local dev"
title: "Connect a Database to your local dev"
description: "Connect a Postgres database to your local development server with Deno Deploy and Deno's tunnel feature"
url: /examples/tunnel_database_tutorial/
---
Expand Down
Loading
Loading