Rendering Pipeline

How Bengal transforms Markdown to HTML

1 min read 108 words

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

  1. Check for explicittemplatein frontmatter
  2. Match by contenttype (page → page.html, section → list.html)
  3. Fall back tosingle.html

Note

The rendering pipeline is lazy — templates are compiled on first use and cached.