Bengal can generate multiple output formats for your content, enabling search functionality, AI discovery, and programmatic access.
Available Formats
Per-Page Formats
Generated for every page in your site:
- JSON (
index.json): Structured data including metadata, HTML content, and plain text. - LLM Text (
index.txt): AI-friendly plain text format optimized for RAG (Retrieval-Augmented Generation) and LLM consumption. RAG allows AI models to "read" your documentation to answer questions accurately.
Site-Wide Formats
Generated at the site root:
- Site Index (
index.json): A searchable index of all pages (useful for client-side search). - Full LLM Text (
llm-full.txt): The complete content of your site in a single plain text file.
Configuration
Enable output formats inbengal.toml:
1 2 3 4 5 6 7 8 9 10 11 | |
Note
Visibility: Output formats currently expose all rendered pages unless specifically excluded viaexclude_sectionsorexclude_patterns. Drafts are handled by the main build configuration (excluded by default unless--draftsis used).
Use Cases
1. Client-Side Search
Fetch the site index to implement fast, client-side search without a backend.
Note
For larger sites, enable the Pre-built Lunr Index to improve performance. This requires thesearchoptional dependency:
pip install bengal[search]
This generatessearch-index.json(a pre-serialized index) instead of justindex.json, which loads 50% faster in the browser.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | |
2. AI & LLM Discovery
Providellm-full.txtto LLMs to allow them to ingest your entire documentation site efficiently.
curl https://mysite.com/llm-full.txt
3. Static API
Use your static site as a read-only API for other applications.
1 2 3 4 5 6 | |