Expressions reference
Every line shows the source in backticks, then the live result. Values come from the index of this example space.
Literals
| Source | Live |
|---|---|
${42} and ${-3.5} |
42 and -3.5 |
${"text" + " joined"} |
text joined |
${'single quoted'} |
single quoted |
${true} / ${false} |
true / false |
${null} |
— |
${[1, 2, 3]} |
1, 2, 3 |
${["a", "b"]} |
a, b |
An escape like \n, \", \' and \\ works inside a string.
Operators
| Source | Live |
|---|---|
${1 + 2 * 3} |
7 |
${(1 + 2) * 3} |
9 |
${7 - 3} and ${7 % 3} |
4 and 1 |
${7 / 3} |
2.33 |
${-7} |
-7 |
${2 > 1} and ${2 >= 2} |
true and true |
${1 < 2} and ${1 <= 2} |
true and true |
${1 == 1} and ${1 != 1} |
true and false |
${true and false} |
false |
${true or false} |
true |
${not true} |
false |
${null ?? "fallback"} |
fallback |
${1 > 2 ? "yes" : "no"} |
no |
+ adds two numbers or joins two strings; mixed types are an error. Division by zero is an error.
Field access
this is the page carrying the expression; a page value has path, title, folder, tags, date, modified and fm (the frontmatter). A missing field or a field on null is null.
| Source | Live |
|---|---|
${this.title} |
Expressions reference |
${this.path} and ${this.folder} |
Features/Expressions/Reference and Features/Expressions |
${this.fm.status ?? "offen"} |
offen |
${page("Projects/Alpha").title} |
Project Alpha |
${page("Projects/Alpha").fm.budget} |
12000 |
${page("Nope").title} |
— |
A name is [A-Za-z_][A-Za-z0-9_]*; - is always the minus operator, so this.fm.budget-10 subtracts. A key with a hyphen is quoted: this.fm."due-date", {"links-to": this}. today() uses UTC.
Builtins
| Builtin | Meaning | Live |
|---|---|---|
count(q) |
matches before limit |
2 |
page(path) |
one page record or null |
Project Alpha |
sum(list, feld) |
sum over a page list or numbers | 16500.5 |
min / max(list, feld) |
smallest and largest number | 4500.5 / 12000 |
avg(list, feld) |
average; null for an empty list |
8250.25 |
len(x) |
length of a list or string | 5 |
join(list, sep) |
join with a separator | a · b · c |
lower(s) / upper(s) |
case | hello / HELLO |
round(x, n) |
round to n places |
3.14 |
today() / date(s) |
today, or a date from an ISO string | 2026-10-10 / 2026-01-15 |
days(a, b) |
whole days from b - a |
14 |
fmt_date(d, muster) |
date as YYYY, MM, DD |
10.10.2026 |
link(path, label?) |
a link value | Alpha |
A whole page list
pages renders through the same list renderer as the pages block:
- Project Alpha2026-09-01
- Project Beta2026-09-15
What the language does not have
No assignment, no lambdas, no loops, no user functions, no regular expressions, no indexing with [] and no writes. An expression can only read, and it always ends.