This library is in flux. APIs may change without notice. Generated from source with koruc 0.1.7 on 8/19/2026.
Liquid Template
~import std/liquid_templateKoru Standard Library: Liquid Templating
liquid_template.kz · 2 tors · ~[comptime]· ~[runtime]
Koru Standard Library: Liquid Templating
Provides Liquid template rendering for code generation.
The first argument is the template, additional args become context.
Syntax:
{{ variable }} - Output value from context
{% if key %}...{% endif %} - Conditional block
{% unless key %}...{% endunless %} - Inverted conditional
Usage:
emit("Hello {{ name }}!", name: "Alice")
Output: Hello Alice!
// Emit template output at runtime (prints rendered template)
// First positional arg is the template string, named args are context
~[keyword|comptime|transform] pub tor emit {
expr: Expression,
item: *const Item,
program: *const Program,
allocator: std.mem.Allocator
} -> SiteResult// Internal event for shape checking (never runs)
~[norun] pub tor emit.impl { text: string }