truncate

Shorten a string to a specified character count and append an ellipsis if truncated.

Syntax

{{ string | truncate: length, ellipsis }}

Example

{% assign headline = "Enterprise Programmatic SEO Platform" %}{{ headline | truncate: 15 }}

Output

Enterprise P...

The truncate filter truncates a string down to a specified maximum character length, appending an ellipsis ('...' by default) to signal that content was abbreviated.

On keyword combination landing pages, truncate prevents long descriptions or user reviews from overflowing fixed card dimensions in responsive grids. For example: {{ row.testimonial | truncate: 80 }}. This maintains uniform card heights across mobile and desktop viewports while encouraging users to click through for full details.

Try this syntax in the editor.