An llms.txt file is a machine-readable document that helps AI assistants understand your website's structure and content. It follows the emerging llms.txt standard - a lightweight protocol for providing context to language models.
Enabling llms.txt Generation
Leafpad automatically generates llms.txt for you, which you can integrate into your site to improve its visibility in AI-powered chats and searches.
To enable llms.txt:
Log into the Leafpad dashboard
Navigate to Settings > LLM
Enable "Generate llms.txt automatically"
Once enabled, Leafpad will periodically generate llms.txt for your site, which can be served via Cloudflare or by directly hitting the Leafpad API.
Each time a new blog is published in Leafpad, the content is automatically included in the llms.txt file. This ensures AI agents always have access to your latest content without manual updates.
Markdown Document Delivery
Leafpad supports dual content delivery: regular HTML pages optimized for human readers and search engines, alongside Markdown versions specifically optimized for AI consumption.
How it works: Any blog URL can be accessed in Markdown format by simply appending .md to the end. For example:
Human-readable:
yoursite.com/blog/my-postAI-optimized:
yoursite.com/blog/my-post.md
Why this matters: AI assistants can directly fetch and parse Markdown content more efficiently than HTML. The Markdown format preserves the document structure, headings, and formatting without the overhead of HTML tags, stylesheets, or JavaScript resulting in faster processing and more accurate content understanding by AI agents.
This dual-format approach ensures your content is accessible to both human readers through traditional SEO and AI assistants through optimized Markdown delivery
Benefits
For AI Integration
AI assistants can accurately reference and cite your documentation
Enables better answers when users ask AI tools about your product
Provides structured context without requiring AI to crawl your entire site
For Discoverability
Makes your content more accessible to AI-powered search and research tools
Helps AI understand relationships between different pages and concepts
Reduces hallucinations by providing authoritative source material
Technical Advantages
Single, compact file vs. multiple page fetches
Markdown format preserves structure and hierarchy
Self-updating based on your site content
Example
When generated, your llms.txt file might look like:
# Leafpad Documentation
> Leafpad is a lightweight note-taking platform
## Getting Started
/docs/quickstart: Quick start guide for new users
## Features
/docs/llms-txt: Automatic llms.txt generation for AI discoverability
/docs/markdown: Full markdown support with syntax highlighting
/docs/sharing: Share notes via public links
## API Reference
/api/overview: REST API documentation
/api/authentication: API authentication methodsThis gives AI assistants a clear map of your documentation structure and content summaries, enabling them to direct users to the right resources.
Published with LeafPad