Add llms-full.txt for AI consumption#798
Merged
RetricSu merged 2 commits intoMay 20, 2026
Merged
Conversation
- Add scripts/generate-llms-full.js to generate llms-full.txt from docs source - Add website/static/llms-full.txt containing the full documentation corpus - The generated file includes all docs pages (excluding partials) with MDX components stripped for clean LLM consumption Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
@humble-little-bear is attempting to deploy a commit to the CKBA-2026 Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a full-documentation text corpus (llms-full.txt) intended for AI/LLM consumption, along with a Node.js generator script to rebuild it from the Docusaurus docs sources.
Changes:
- Adds
website/static/llms-full.txtcontaining the full concatenated docs corpus (prefixed by the curatedllms.txt). - Adds
scripts/generate-llms-full.jsto walkwebsite/docs/, clean MDX/Docusaurus syntax, and producellms-full.txt.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| scripts/generate-llms-full.js | Generator that walks docs, strips/rewrites MDX constructs, and writes the combined corpus. |
| website/static/llms-full.txt | Generated full corpus output intended to be served directly for AI ingestion. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Only remove import statements outside fenced code blocks, preserving code examples like TypeScript imports inside \\`\\`\\` blocks. - Parse frontmatter id/slug to generate correct doc URLs instead of deriving them purely from file paths. - Unwrap Docusaurus mdx-code-block + Tabs/TabItem into plain Markdown with \"**Command:**\" / \"**Response:**\" labels. - Extract key props from instructional JSX components: - CodeTabs → labeled code blocks - TutorialHeader → estimated time / tools metadata - ImgContainer → Markdown images - CopyLink → Markdown links - Fix CardLayout removal bug where the self-closing regex incorrectly consumed nested Card components. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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
This PR adds a
llms-full.txtfile containing the complete text corpus of the Nervos CKB documentation, following the pattern established by other major blockchain documentation sites (Aptos, BNB Chain, Polkadot, NEAR).Changes
website/static/llms-full.txt— Full documentation corpus (~1.3MB, 173 pages) generated from all.mdand.mdxsource files underwebsite/docs/. The file starts with the curatedllms.txtindex, followed by the complete text of every documentation page.scripts/generate-llms-full.js— A Node.js script that regeneratesllms-full.txtfrom source. It:website/docs/and includes all pages (excluding partials prefixed with_)<TutorialHeader>,<Tooltip>,<Tabs>, admonition wrappers, etc.)Why
llms.txtprovides a curated, selective index.llms-full.txtprovides the complete text content so that AI assistants and tools can ingest the full documentation without scraping individual pages.Test plan
llms-full.txtis served athttps://docs.nervos.org/llms-full.txtafter deploymentnode scripts/generate-llms-full.jsand confirm it produces the same output🤖 Generated with Claude Code