Docs
OverviewTemplate SyntaxQuick Guide

Resources

Source code

Modifiers

Text
Casing
lowerslugtitletitle_modelupper
Edit
concathashreplacereplace_patternreverseshortenwrap
Split & join
joinlinessplit
Trim
trimtrim_prefixtrim_suffix
Escape
escape_htmlescape_jsescape_url
Format
currencydatedecimalfrom_datelengthline_numbers
Collections
Access
findfirstkeylastpluck
Query
filterhasis
Transform
cleanflattenmapmergesortsum
Files & paths
File
file
Path
dirnameextext_dotext_prependext_trimfilename
Convert
Parse
from_csvfrom_jsonfrom_yaml
Serialize
jsonmarkdownyaml
Logic
Compare
andeqgtgteltlteneqnotor
Default
defaultwhen
Render
Template
template
Datetime
add_daysadd_monthsadd_yearsdays_between
Math
adddividemultiplysubtract
Docs/Sintax/Logic/Compare

Compare

Compare values for use in conditional expressions.

Compare

andReports whether the piped value and its argument are both truthy, reading truthiness the way a template if does.{{ enabled | and:has_rows }}eqReports numeric equality across the int and float kinds, so 5 equals 5.0.{{ total | eq:5.0 }}gtReports whether the value falls after the given date, the gt clause reached when both sides are real dates, so {{ expires_at | gt:now }} asks whether a date is still ahead.{{ expires_at | gt:today }}gteReports whether the value falls on or after the given date, the same stance GtTime takes on what counts as a date.{{ score | gte:70 }}ltReports whether the value falls before the given date, so {{ starts_at | lt:now }} asks whether a date has passed.{{ starts_at | lt:today }}lteReports whether the value falls on or before the given date, the same stance LtTime takes on what counts as a date.{{ days_left | lte:14 }}neqReports numeric inequality across the int and float kinds, so 5 and 5.0 are equal and this returns false for them.{{ count | neq:5.0 }}notInverts the truthiness of the value, following the same rules as a template if.{{ name | not }}orReports whether either the piped value or its argument is truthy, reading truthiness the way a template if does.{{ draft | not | or:published }}
Edit or read the source on GitHub
PreviousLogicNext and

Built with in Vilnius, Lithuania Say hello!

ProductsOpen sourceDocs GitHub