Core Concepts

Foundational concepts for understanding Bengal

7 pages in this section

Understand how Bengal organizes content, processes files, and generates sites.

The Build Model

flowchart LR subgraph Input A[Content .md] B[Templates .html] C[Assets CSS/JS] end subgraph Process D[Parse] E[Render] F[Optimize] end subgraph Output G[public/] end A --> D B --> E C --> F D --> E --> F --> G

Key Concepts

Concept What It Means
Page A single content file (.md) → single HTML output
Section A directory with_index.md→ list page with children
Bundle A directory withindex.md→ page with co-located assets
Template Jinja2 HTML that wraps your content
Asset CSS, JS, images — processed and optimized

Mental Model

Your file structure becomes your URL structure:

content/blog/hello.md → /blog/hello/
content/docs/_index.md → /docs/

Templates wrap content in HTML:

page.content + single.html → final HTML

Static files are copied and optionally processed:

static/css/main.css → public/css/main.a1b2c3.css

Tip

Start simple: Most sites only need pages and a theme. Add sections when you need grouping, bundles when you need co-located assets.

In This Section

Configure Bengal Configuration reference for site settings, menus, and content processing
Manage Assets Process CSS, JavaScript, images, and other static files
Organize Content Map files to URLs and organize content into sections
Use Templates Access variables and objects in Jinja2 templates
Build Pipeline How Bengal orchestrates builds, processes content, and performs incremental builds