Skip to content

Sections and Structure

Organizing sections in llms.txt

Recommended section names for documentation:

SectionPurposePriority
## DocsMain documentationHigh
## APIAPI ReferenceHigh
## GuidesTutorials and guidesMedium
## ExamplesCode examplesMedium
## ReferenceReference materialsMedium
SectionPurposePriority
## BlogArticles and newsLow
## ChangelogVersion historyLow
## CommunityCommunity, forumsLow
## OptionalSecondary resourcesCan be skipped

The ## Optional section has special meaning in the specification. Resources in it can be skipped when forming context for LLM.

## 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 License
def get_context(llms_txt, include_optional=True):
sections = parse_llms_txt(llms_txt)
if not include_optional:
sections.pop('Optional', None)
return sections
  1. H1 title — project name
  2. Blockquote — brief description
  3. Descriptive text — important details
  4. Main sections — Docs, API, Guides
  5. Additional sections — Examples, Reference
  6. Optional — always last
# 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 chat

For sites with multiple languages, you can create separate files:

/llms.txt → Main (English)
/ru/llms.txt → Russian version
/zh/llms.txt → Chinese version
## Документация
- [Быстрый старт](https://example.com/ru/docs/start): Начните здесь
- [Справочник API](https://example.com/ru/docs/api): Описание API
## 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 libraries
## JavaScript
- [npm Package](url): Installation and usage
- [Browser Guide](url): Browser integration
## Python
- [PyPI Package](url): pip installation
- [Django Integration](url): Django setup

❌ 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, WebSocket

Don’t create sections without links:

## Coming Soon
(empty)

One link should only appear in one section.