Syntax

Kida template syntax reference

1 min read 181 words

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

Seealso