Introduction

2026-06-19

This documentation is intended for theme developers: it explains Tera template syntax, global variables, and built-in functions. Site operators (writing Markdown, configuring everkm.yaml) should start with Concepts and Architecture and Quick Start; theme structure and JsRender are covered in Theme Development.

Delimiters

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

  1. {{ and }}: used for expression output
  2. {% and %}: used for template structure control
  3. {# and #}: used for comments

Raw Content

All content inside a raw block is output as-is, without being parsed by the template engine.

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

Whitespace Control

Template control statements preserve newlines (\n). If you need to strip surrounding whitespace, use the {%- or -%} delimiters. For example:

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

Output


2

There is an extra leading newline. To output on a single line, use the following code:

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

Comments

Template comments must be wrapped with {# and #}. Anything inside will not be output.