Kida extends Jinja2 with pattern matching, pipeline operators, and unified block endings. Your existing Jinja2 templates work without changes—Kida parses both syntaxes.
Note
Do I need this? Use for Kida-specific syntax topics (operators, variables, control flow). For a single-page overview, see Kida Syntax.
Quick Reference
| Feature | Kida | Jinja2 |
|---|---|---|
| Block endings | {% end %} |
{% endif %}, {% endfor %}, etc. |
| Template variables | {% let x = ... %} |
{% set x = ... %} |
| Pattern matching | {% match %}...{% case %} |
{% if %}...{% elif %} |
| While loops | {% while cond %} |
Not available |
| Pipeline operator | |> |
Not available |
| Optional chaining | ?. |
Not available |
| Null coalescing | ?? |
| default() |
| Fragment caching | {% cache %} |
Extension required |
| Functions | {% def %}(sees outer variables) |
{% def %}(isolated) |
| Range literals | 1..10 |
range(1, 11) |
Topics
Block Syntax
Control flow blocks, endings, and pattern matching
Variables and Scoping
Template variables, scoping rules, and exports
Operators
Pipeline, optional chaining, and null coalescing operators
Functions
Reusable template components that automatically access outer variables
Seealso
- Kida Syntax Reference — Complete syntax documentation
- Template Functions — Available filters and functions
In This Section
Block Syntax
Control flow blocks, endings, and pattern matching
Functions
Reusable template components that automatically access outer variables
Operators
Pipeline, optional chaining, and null coalescing operators
Variables and Scoping
Template variables, scoping rules, and exports
Related Pages
Templating
Kida template engine, layouts, inheritance, and partials
Assets
CSS, JavaScript, images, and fonts
Build Sites
Write, structure, customize, and extend your Bengal site
Theming
Templates, assets, and visual customization
Template Cookbook
Common templating patterns and Bengal-specific features