How Bengal transforms source content into final output.
| Stage | What it does | Key modules |
|---|---|---|
| Discovery | Find.mdfiles, parse frontmatter |
bengal/content/discovery/ |
| Rendering | Template selection, Markdown → HTML | bengal/rendering/, bengal/parsing/ |
| Post-Process | Sitemap, RSS, redirects, social cards | bengal/postprocess/ |
| Health | Link validation, content checks | bengal/health/ |
Template Resolution
- Check for explicit
templatein frontmatter - Match by content
type(page →page.html, section →list.html) - Fall back to
single.html
Note
The rendering pipeline is lazy — templates are compiled on first use and cached.