巴克励步
发布于:2025-01-02
size 还支持“点标记”(例如 {{ my_string.size }})。这种用法便于你在标签(tag)中使用 size 过滤器,例如条件判断标签(tag)。
{{ "Ground control to Major Tom." | size }}
28
{% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}
{{ my_array | size }}
4
{% if site.pages.size > 10 %}
This is a big website!
{% endif %}