Skip to content

truncate

Shortens a string to a number of characters.

The ellipsis (default “…”) counts towards the length.

string | truncate: length, ellipsis
Name Type Description
length (required) number Maximum length.
ellipsis string Text added at the end (default “…”).

string

Liquid
{{ 'Hand-embroidered linen abaya' | truncate: 15 }} · {{ 'Hand-embroidered linen abaya' | truncate: 15, '…' }}
Output
Hand-embroid... · Hand-embroider…

Shopify: Same as Shopify.

Since theme platform 1.0.

Was this page helpful?