Skip to content

Commit 28c6770

Browse files
feat(public): serve /llms.txt at site root from content repo (#16)
The content repo now owns llms.txt — a single LLM-discoverability manifest (https://llmstxt.org) documenting the seven service endpoints, the anonymous-tier model, the claim flow, and the conventions an LLM should follow when scripting against the platform. The prerender script gained one step: after building all per-route HTML, it copies .content/llms.txt to dist/llms.txt so any static host serves it at https://instanode.dev/llms.txt. This pairs with the upstream content commit that added a "Prompt for any LLM (no setup needed)" section to every one of the 104 use-case .md files. Each prompt is paste-ready into ChatGPT, Claude, or Gemini — the LLM reads llms.txt for context, then generates a runnable script that drives the platform's HTTP API with real curl calls. No MCP server, no API key, no install. Verified: dist/llms.txt is 5.7 KB (the full manifest); every one of the 104 /use-cases/<slug>/index.html pages contains the new prompt section. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 23ffb81 commit 28c6770

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

scripts/prerender.mjs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,21 @@ async function main() {
133133
written++
134134
}
135135

136-
// Step 5: clean up the SSR bundle — it's only needed during this script.
136+
// Step 5: copy /llms.txt from the content repo to dist root. The
137+
// llms.txt convention (https://llmstxt.org) expects the file at the
138+
// domain root. Source of truth is .content/llms.txt — that lets the
139+
// content repo author it like any other content file, and the
140+
// dashboard build inlines it into dist/ for static hosting to serve.
141+
const llmsSource = resolve(ROOT, '.content/llms.txt')
142+
if (existsSync(llmsSource)) {
143+
const llmsContent = await readFile(llmsSource, 'utf-8')
144+
await writeFile(resolve(DIST, 'llms.txt'), llmsContent, 'utf-8')
145+
console.log('prerender: copied llms.txt to dist root')
146+
} else {
147+
console.warn('prerender: no .content/llms.txt found, skipping')
148+
}
149+
150+
// Step 6: clean up the SSR bundle — it's only needed during this script.
137151
// Leaving it in dist-ssr would inflate the GH Pages upload by ~400 KB.
138152
await rm(SSR_DIST, { recursive: true, force: true })
139153

0 commit comments

Comments
 (0)