feat: add @docusaurus/plugin-llms-txt #11420
Open
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.
feat: add @docusaurus/plugin-llms-txt
Pre-flight checklist
Motivation
This PR adds support for generating
llms.txt
files, which provide structured context about documentation sites for AI tools and LLMs. As AI assistants become increasingly important in developer workflows, there's a growing need for documentation sites to be AI-friendly.Problem: AI tools struggle to understand the structure and navigation of documentation websites, leading to poor recommendations and missed content.
Solution: The
llms.txt
standard provides a simple, machine-readable index of site content that AI tools can use to better understand and reference documentation.Benefits:
Test Plan
Live Demo & Testing
Deploy Preview: https://deploy-preview-11420--docusaurus-2.netlify.app/
Key test links:
Verified Working Features
Comprehensive Test Coverage
Manual Testing
Example Output
Related issues/PRs
This addresses the growing ecosystem need for AI-friendly documentation sites. The implementation follows the emerging
llms.txt
standard and provides a foundation for future AI integrations with Docusaurus.Implementation highlights:
Technical Details
Plugin Features:
postBuild
lifecyclenoIndex
settingNo Breaking Changes: This is a purely additive feature that requires opt-in usage.
Dependencies: Only uses existing Docusaurus packages +
fs-extra
andtslib
(no new security surface).Scale Testing: Successfully generates llms.txt with 1,300+ entries from the full Docusaurus website, demonstrating production readiness.