Skip to main content

llms.txt Plugin Demo

This page demonstrates the @docusaurus/plugin-llms-txt plugin.

What is llms.txt?

The llms.txt standard helps AI tools understand your documentation site structure by providing a machine-readable index of content.

Plugin Features

  • Automatic generation during build
  • Smart content categorization
  • Configurable options
  • TypeScript support
  • Zero configuration required

Example Configuration

docusaurus.config.js
module.exports = {
plugins: [
[
'@docusaurus/plugin-llms-txt',
{
siteTitle: 'My Documentation Site',
siteDescription: 'Comprehensive guides and API references',
includeBlog: true,
includeDocs: true,
includePages: true,
customContent: 'Additional context about this site for AI tools.',
},
],
],
};

Generated Output

The plugin generates a file at /llms.txt with content like:

# My Documentation Site
Comprehensive guides and API references

Site URL: https://example.com/
Last updated: 2025-09-22

Additional context about this site for AI tools.

## Content

### Documentation
- [Getting Started](https://example.com/docs/getting-started)
- [API Reference](https://example.com/docs/api)

### Blog Posts
- [Release Notes](https://example.com/blog/release-v2)

### Pages
- [Community](https://example.com/community)

Benefits for AI Tools

When AI assistants analyze your site, they can:

  • Understand your content structure
  • Provide better recommendations
  • Find relevant documentation faster
  • Give more accurate answers about your project

Plugin Options

OptionTypeDefaultDescription
filenamestring'llms.txt'Output filename
siteTitlestringsiteConfig.titleCustom site title
siteDescriptionstringsiteConfig.taglineCustom description
includeBlogbooleantrueInclude blog posts
includeDocsbooleantrueInclude documentation
includePagesbooleantrueInclude static pages
maxDepthnumber3Maximum route depth
excludeRoutesstring[][]Routes to exclude
customContentstringundefinedAdditional context
includeFullContentbooleanfalseInclude content excerpts

Live Example

This Docusaurus site now has an llms.txt file generated automatically!

View the generated llms.txt at /llms.txt (will be available after build)