Files
liquid/filters/truncatewords.md
2016-03-15 19:36:29 -04:00

389 B

title
title
truncatewords

Shortens a string down to the number of words passed as the argument. If the specified number of words is less than the number of words in the string, an ellipsis (...) is appended to the string.

{% raw %}
{{ "Ground control to Major Tom." | truncatewords: 3 }}
{% endraw %}
{{ "Ground control to Major Tom." | truncatewords: 3 }}