FleekSiteFLEEKSITE
On this section
Liquid reference

Filters.

The standard Liquid filters are all available. FleekSite adds filters for prices and currency, dates, strings, arrays, JSON and images. A few standard filters behave differently in compat mode; those are called out at the end.

Standard filters

Available from LiquidJS: default, escape / escape_once, strip / lstrip / rstrip, split, join, append, prepend, replace / replace_first, remove / remove_first, downcase, capitalize, slice, url_encode / url_decode, plus, minus, times, divided_by, modulo, abs, at_least, at_most, ceil, floor, round, compact, concat, first, last, size, sort, sort_natural, reverse, map, where, newline_to_br, strip_html, strip_newlines and date. Three more (truncate, truncatewords, upcase) are standard names FleekSite overrides in compat mode; see below.

Price and currency

FilterResult
priceFormats a number as a two-decimal string ("1300.00"). Any value below 1.00 floors to "0.00".
exchange: from, toConverts an amount between currencies, for example {{ price | exchange: 'USD', 'JMD' }}. Returns nothing on a failed conversion.
{{ product.price | price }}                {% comment %} 1300.00 {% endcomment %}
{{ product.price | exchange: 'USD', site.currency | price }}

A post's price is already a two-decimal string in the context, so | price is only needed on raw numbers.

Dates and time

FilterResult
custom_dateFormats a date, default pattern dd.MM.yyyy. Pass a pattern: {{ post.inserted_at | custom_date: 'dd MMM yyyy' }}.
time_agoA relative phrase, for example "3 days ago".
from_unixConverts a Unix timestamp (seconds) to an ISO string.

All dates are formatted as UTC wall-clock time. The standard date filter is also available.

Strings

FilterResult
strip_tagsRemoves HTML tags. A nil input returns an empty string (not nil), which matters when the result feeds a condition or a collection filter.
camelcaseCapitalises the first letter of each word.
friendly_numberGroups thousands with a thin space.
mdRenders a small subset of Markdown (bold, italic, links, headings, line breaks) to HTML.
like: otherA fuzzy string match, true when the two strings are close enough.

Maths

Null-safe arithmetic that treats missing operands as zero, alongside the standard plus / minus / times / divided_by:

FilterResult
add: n / subtract: nAddition and subtraction, nil-safe.
multiply: n / divide: nMultiplication and division. Dividing by zero returns the input unchanged.
parse_int / parse_floatParse a value to a number, defaulting to zero.
random_numA random integer from 1 to 999999.

Arrays and maps

FilterResult
chunk: nSplits an array into groups of n.
filter_list: key, valueKeeps items whose key equals value.
uniqRemoves duplicates.
contains: item / holds: itemTrue when an array includes the item, or a string contains the substring.
list_wrapWraps a non-array value in an array.
randomA random element of an array.
take: "a,b,c"Picks those keys from a map.
map_to_listTurns a map into a list of key and value pairs.

JSON and images

FilterResult
json_encodeSerialises a value to a JSON string.
json_decodeParses a JSON string to a value.
put: key, valueReturns a copy of a map with a key set.
uri_encodeTurns a map into a URL query string.
resize: "WxH"Rewrites an image URL to a resized version through the image CDN, for example {{ product.primary_media.url | resize: '600x600' }}.
crop: "WxH", gravityA cropped variant of an image, with an optional gravity.

Compat overrides

Three standard filter names carry the older engine's behaviour in Compat mode. In Standard mode they are the LiquidJS built-ins.

FilterCompatStandard
truncate: nCuts a few characters short of n and counts by grapheme; truncates a string that already fitsThe Shopify-standard truncate
truncatewords: nSplits on single spaces only; ellipsis is fixedThe Shopify-standard truncatewords
upcaseCoerces any input through a string conversionThe LiquidJS upcase

If a truncated string looks a few characters short on a compat site, this is why. See Render modes.