feat: add hand-crafted llms.txt with build-time validation#784
Open
feat: add hand-crafted llms.txt with build-time validation#784
Conversation
Fix incorrect parameter names (anchor_01/anchor_02 → anchor1/anchor2), wrong response field reference (Time → durationSeconds), broken anchor link, unnecessary sudo, and replace 120-line failure example with a concise successful one. Add specific hardware guidance in a warning admonition.
The plugin config referenced non-existent paths (docs/api/**, docs/learn/**) causing it to silently fall back to unfiltered defaults. Changes: - Disable llms.txt generation (will be replaced by hand-crafted static file) - Fix include ordering to follow logical reading order - Enable excludeImports and removeDuplicateHeadings for cleaner output - Set proper title and description for the llmstxt.org standard header Refs: ethersphere/DevRel#839
Create static/llms.txt — a curated, llmstxt.org-compliant index that helps AI agents quickly find relevant Swarm documentation. Organised into 8 task-oriented sections (install, configure, upload, host, build, concepts, reference, optional) covering 75 doc pages. Add scripts/validate-llms-txt.mjs that runs during prebuild to detect stale links and missing coverage, keeping llms.txt in sync as docs evolve.
✅ Deploy Preview for test-twitter-preview-testing-3 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
And who is gonna check the logs and fix ? |
Collaborator
Author
|
If you have any suggestions to use some channel for alert messages, if that is possible? In any case, one of the files is manually generated, so checks just alert if they find discrepancies. It can and should be checked like the other files, in the "human" docs, for perhaps being obsolete. |
Update the OpenAPI spec URL to the local copy that will be served from the docs site (see #827) instead of the GitHub raw URL.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes ethersphere/DevRel#838.
static/llms.txt— Hand-crafted, llmstxt.org-compliant index file with 75 curated doc links organised into 8 task-oriented sections (install, configure, upload, host, build, concepts, reference, optional). Includes intro context (chunks, DISC, xBZZ, ports) and top-level resource links (API ref, OpenAPI spec, bee-js, Book of Swarm, whitepaper).scripts/validate-llms-txt.mjs— Prebuild validation script that cross-checksllms.txtURLs against actual doc files. Reports stale links and missing coverage as warnings (exit 0, non-blocking).package.json— Chains the validation script into the existingprebuildhook.README.md— Documents the llms.txt workflow and what to do when validation warnings appear.Also includes the plugin config fix from b62582c that reconfigures
docusaurus-plugin-llmsto only generatellms-full.txt.How it works
Every build warns if
llms.txthas drifted from the actual docs, without blocking.Test plan
npm run buildsucceeds, validation script runs with only expected warnings (4 intro pages + 1 stub)npx docusaurus serve—/llms.txtreturns the hand-crafted file,/llms-full.txtreturns plugin outputllms.txtto confirm they resolve (not 404)🤖 Generated with AI