Skip to content

Examples

Leonard Ramminger edited this page Aug 31, 2026 · 1 revision

Examples

Greeting

Hello {{ name }}

Include + conditional

{{ include "partials/header" }}
{{ if enabled }}Enabled{{ else }}Disabled{{ endif }}

Loop

{{ for item in items }}{{ loop.index }}={{ item }};{{ else }}empty{{ endfor }}

Native function

{{ fn greet(name) }}Hello {{ name }}{{ endfn }}
{{ greet("Ada") }}

Lua function

{{ fn users() lua:block }}
return { { name = "Ada" }, { name = "Grace" } }
{{ endfn }}

{{ for user in users() }}{{ user.name }};{{ endfor }}

Builtins

{{ __DATE__ }}
{{ __FILENAME__ }}
{{ __UUID__ }}

Clone this wiki locally