Statico Source
Contents

Conditions

Show markup only when a condition holds, with a safe expression language.

Building pages, page 10

<If condition="post.featured">★
<ElseIf condition="loop > 1 and post.tags contains 'rust'">…
<Else>…
</If>

Operators: == != === !== < <= > >=, && || ! (or and or not), contains (substring, list membership, object key), parentheses, .length. Values: numbers, 'strings', true/false/null, variables, {placeholders}. Inside a loop, item fields can be used bare (featured = post.featured). Conditions are interpreted safely; they never run JavaScript.