Sections and Structure
Organizing sections in llms.txt
Section Types
Section titled “Section Types”Main Sections
Section titled “Main Sections”Recommended section names for documentation:
| Section | Purpose | Priority |
|---|---|---|
## Docs | Main documentation | High |
## API | API Reference | High |
## Guides | Tutorials and guides | Medium |
## Examples | Code examples | Medium |
## Reference | Reference materials | Medium |
Additional Sections
Section titled “Additional Sections”| Section | Purpose | Priority |
|---|---|---|
## Blog | Articles and news | Low |
## Changelog | Version history | Low |
## Community | Community, forums | Low |
## Optional | Secondary resources | Can be skipped |
Optional Section
Section titled “Optional Section”Purpose
Section titled “Purpose”The ## Optional section has special meaning in the specification. Resources in it can be skipped when forming context for LLM.
When to Use
Section titled “When to Use”## Optional
- [Changelog](https://example.com/changelog): Version history- [Roadmap](https://example.com/roadmap): Development plans- [Contributing](https://example.com/contributing): How to contribute- [Code of Conduct](https://example.com/coc): Community rules- [License](https://example.com/license): MIT LicenseProcessing Logic
Section titled “Processing Logic”def get_context(llms_txt, include_optional=True): sections = parse_llms_txt(llms_txt)
if not include_optional: sections.pop('Optional', None)
return sectionsSection Order
Section titled “Section Order”Recommended Order
Section titled “Recommended Order”- H1 title — project name
- Blockquote — brief description
- Descriptive text — important details
- Main sections — Docs, API, Guides
- Additional sections — Examples, Reference
- Optional — always last
Complete Structure Example
Section titled “Complete Structure Example”# FastHTML
> Modern Python web framework for building fast, interactive web applications.
Key features:- No JavaScript required- HTMX integration- Server-side rendering
## Documentation
- [Getting Started](https://fastht.ml/docs/): Quick start guide- [Tutorial](https://fastht.ml/docs/tutorial): Step-by-step tutorial- [API Reference](https://fastht.ml/docs/api): Complete API docs
## Guides
- [Forms](https://fastht.ml/docs/guides/forms): Working with forms- [Database](https://fastht.ml/docs/guides/db): Database integration- [Deployment](https://fastht.ml/docs/guides/deploy): Production deployment
## Examples
- [Todo App](https://github.com/fasthtml/examples/todo): Basic todo application- [Blog](https://github.com/fasthtml/examples/blog): Blog with comments- [E-commerce](https://github.com/fasthtml/examples/shop): Shopping cart demo
## Optional
- [Changelog](https://fastht.ml/changelog): Version history- [Contributing](https://github.com/fasthtml/fasthtml/CONTRIBUTING.md): Contribution guide- [Discord](https://discord.gg/fasthtml): Community chatSection Localization
Section titled “Section Localization”Multilingual Sites
Section titled “Multilingual Sites”For sites with multiple languages, you can create separate files:
/llms.txt → Main (English)/ru/llms.txt → Russian version/zh/llms.txt → Chinese versionTranslated Section Names
Section titled “Translated Section Names”## Документация
- [Быстрый старт](https://example.com/ru/docs/start): Начните здесь- [Справочник API](https://example.com/ru/docs/api): Описание APILink Grouping
Section titled “Link Grouping”By Content Type
Section titled “By Content Type”## Tutorials
- [Beginner Tutorial](url): For new users (30 min)- [Advanced Tutorial](url): Deep dive (2 hours)- [Video Course](url): Video walkthrough
## API Reference
- [REST API](url): HTTP endpoints- [GraphQL API](url): GraphQL schema- [SDK Reference](url): Client librariesBy Platform
Section titled “By Platform”## JavaScript
- [npm Package](url): Installation and usage- [Browser Guide](url): Browser integration
## Python
- [PyPI Package](url): pip installation- [Django Integration](url): Django setupToo Many Sections
Section titled “Too Many Sections”❌ Bad:
## Getting Started## Installation## Configuration## Basic Usage## Advanced Usage## Troubleshooting## FAQ## API## REST## GraphQL## WebSocket...✅ Good:
## Documentation
- [Getting Started](url): Includes installation, config, basic usage- [Advanced Guide](url): Advanced topics and troubleshooting
## API Reference
- [Complete API](url): REST, GraphQL, WebSocketEmpty Sections
Section titled “Empty Sections”Don’t create sections without links:
## Coming Soon
(empty)Duplicate Links
Section titled “Duplicate Links”One link should only appear in one section.