Introduction

2026-06-17

Delimiters

Template files are typically plain HTML files that use specific delimiters to wrap template syntax. The system has the following 3 types of delimiters

  1. {{ and }}: For outputting expression results
  2. {% and %}: For template structure control
  3. {# and #}: For comments

Raw Content

All content within a raw block is not parsed by the template and is output as-is.

{% raw %}
  Hello {{ name }}
{% endraw %}

Whitespace Control

Template control statements preserve newlines (\n). To remove surrounding whitespace, use the {%- or -%} delimiters. For example:

{% set my_var = 2 %}
{{ my_var }}

Output


2

An extra newline at the beginning. To output on a single line, use the following code

{% set my_var = 2 -%}
{{ my_var }}

Comments

Template comments must be wrapped with {# and #}. Any content inside is not output.