Kida extends Jinja2 with pattern matching, pipeline operators, and unified block endings. Your existing Jinja2 templates work without changes—Kida parses both syntaxes.
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