From b1edf03d8fda20cd3488a87fd5b538684814cc27 Mon Sep 17 00:00:00 2001 From: Aviv Keller Date: Tue, 21 Jul 2026 22:00:37 -0700 Subject: [PATCH 1/3] chore: remove llm cleaner --- scripts/html/index.mjs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/scripts/html/index.mjs b/scripts/html/index.mjs index 7bd0c835..03191303 100644 --- a/scripts/html/index.mjs +++ b/scripts/html/index.mjs @@ -5,19 +5,6 @@ import { promisify } from 'node:util'; const execFileAsync = promisify(execFile); -// TODO: Have doc-kit understand that some pages don't have meaningful information -// The llms-txt generator lists every page with a depth-1 heading. JSX-driven -// pages like the homepage produce entries with no title or description — drop -// them, they carry no information for LLMs. -const cleanLlmsTxt = async path => { - const content = await readFile(path, 'utf8'); - const cleaned = content - .split('\n') - .filter(line => !line.startsWith('- [](')) - .join('\n'); - await writeFile(path, cleaned); -}; - const runDocKit = version => execFileAsync( 'npx', @@ -54,7 +41,6 @@ for (const version of versions) { await cleanLlmsTxt(`./out/docs/api/v${version.match(/\d+/)[0]}.x/llms.txt`); } await runDocKit(); -await cleanLlmsTxt('./out/llms.txt'); // Publish the markdown sources next to the rendered pages so the llms.txt // links (`{path}.md`) resolve to LLM-friendly raw markdown. From e61e49e5561e5f2248eccadb4eff4a39c34fe27a Mon Sep 17 00:00:00 2001 From: Aviv Keller Date: Tue, 21 Jul 2026 22:02:57 -0700 Subject: [PATCH 2/3] Update index.mjs --- scripts/html/index.mjs | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/html/index.mjs b/scripts/html/index.mjs index 03191303..9aaa21d9 100644 --- a/scripts/html/index.mjs +++ b/scripts/html/index.mjs @@ -38,7 +38,6 @@ const versions = JSON.parse(await readFile('./versions.json')); for (const version of versions) { await runDocKit(version); - await cleanLlmsTxt(`./out/docs/api/v${version.match(/\d+/)[0]}.x/llms.txt`); } await runDocKit(); From d85d23c78338108fae467cd22301153fec30f4a7 Mon Sep 17 00:00:00 2001 From: Aviv Keller Date: Tue, 21 Jul 2026 22:08:53 -0700 Subject: [PATCH 3/3] fixup! --- scripts/html/index.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/html/index.mjs b/scripts/html/index.mjs index 9aaa21d9..94d1ff53 100644 --- a/scripts/html/index.mjs +++ b/scripts/html/index.mjs @@ -1,5 +1,5 @@ import { execFile } from 'node:child_process'; -import { cp, readFile, writeFile } from 'node:fs/promises'; +import { cp, readFile } from 'node:fs/promises'; import { statSync } from 'node:fs'; import { promisify } from 'node:util';