v0.2.0 - Partials Support & Custom Root Content
🚀 New Features
Docusaurus Partials Support
- Full support for Docusaurus partial files (MDX files prefixed with underscore)
- Automatically excludes partial files (e.g.,
_shared.mdx) from being processed as standalone documents - Resolves and inlines partial content when imported in other documents
- Handles both default and named imports:
import Partial from './_partial.mdx' - Replaces JSX usage
<Partial />with the actual partial content
Custom Root Content
- New
rootContentoption for customizing the introductory content inllms.txt - New
fullRootContentoption for customizing the introductory content inllms-full.txt - Custom root content support for individual custom LLM files
- Follows llmstxt.org standard allowing markdown sections after title/description
- Enables project-specific context, technical specifications, and navigation hints
🔧 Improvements
URL Resolution
- Plugin now uses actual resolved URLs from Docusaurus routes instead of guessing paths
- Properly handles numbered prefixes in file names (e.g.,
1-page.md→/docs/page) - Uses Docusaurus's route data from the
postBuildlifecycle hook - Comprehensive route matching with fallbacks for backward compatibility
📚 Documentation
- Added comprehensive examples for all new features
- Updated README with usage guides and best practices
- Enhanced changelog with technical details
🧪 Testing
- Added test suites for partials support and custom root content
- All existing functionality continues to work as expected
- 100% backward compatibility maintained
Breaking Changes
None - this release is fully backward compatible.
Example Usage
// docusaurus.config.js
plugins: [
[
'docusaurus-plugin-llms',
{
rootContent: `Welcome to our comprehensive documentation.
This documentation covers:
- Installation and setup guides
- Complete API reference
- Best practices and tutorials
For support, visit https://example.com/support`,
customLLMFiles: [
{
filename: 'llms-api.txt',
includePatterns: ['api/**/*.md'],
fullContent: true,
rootContent: 'Complete API reference. Authentication required.'
}
]
}
]
]