Files
liquid/filters/truncate.md
2015-12-13 22:39:26 -05:00

427 B

title
title
truncate

truncate shortens a string down to the number of characters passed as a parameter. If the number of characters specified is less than the length of the string, an ellipsis (...) is appended to the string and is included in the character count.

{% raw %}
{{ "Ground control to Major Tom." | truncate: 20 }}
{% endraw %}
{{ "Ground control to Major Tom." | truncate: 20 }}