The brain of Bengal — foundational data models and build coordination.
Data Model Overview
graph TB
subgraph "Core Objects"
Site[Site]
Page[Page]
Section[Section]
Asset[Asset]
end
Site --> Section
Site --> Page
Site --> Asset
Section --> Page
Section --> Section
Page --> Asset
Key Components
| Component | Responsibility | Module |
|---|---|---|
| Site | Central container, holds all content | bengal/core/site.py |
| Page | Single content page with metadata | bengal/core/page/ |
| Section | Directory container, holds children | bengal/core/section.py |
| Asset | Static file with processing metadata | bengal/core/asset/ |
Design Principles
- No God Objects: Each class has single responsibility
- Passive Core: Data models don't perform I/O
- Composition over Inheritance: BuildContext passes services
- Immutable Where Possible: Minimize side effects
Seealso
- Design Principles — Full architectural guidelines
- Orchestration — How builds are coordinated
In This Section
Object Model
Site, Page, Section, and Asset data models
Build Cache
How Bengal caches builds for incremental rebuilds
Orchestration
How Bengal coordinates builds and manages phases
Reactive Dataflow Pipeline
Declarative dataflow architecture for Bengal builds with automatic dependency tracking
Content Strategies
Flexible strategies for different site types
Data Flow
How data moves through the build pipeline