Added in: v1.9.1
Returns the number of characters in a string or the number of items in an array.
Input
{{ "Ground control to Major Tom." | size }} |
Output
28 |
Input
{% assign my_array = "apples, oranges, peaches, plums" | split: ", " %} |
Output
|
You can use size
with dot notation when you need to use the filter inside a tag:
{% if site.pages.size > 10 %} |