Syntax

Kida template language syntax and features

2 min read 310 words

Kida's template syntax for expressions, control flow, and composition.

Quick Reference

Element Syntax Example
Output {{ expr }} {{ user.name }}
Tags {% tag %} {% if %},{% for %}
Block end {% end %} Unified ending
Comments {# text #} {# TODO #}
Filters | filter {{ name \| upper }}
Pipeline |> filter {{ x \|> a \|> b }}

Syntax Guide

Key Features

  • Unified{% end %} — Clean, consistent block endings
  • Pattern matching{% match status %}{% case "active" %}...{% end %}
  • Pipeline operator{{ title |> escape |> upper |> truncate(50) }}
  • Built-in caching{% cache "sidebar" %}...{% end %}