只是{% for product in category.products | limit: section.limit %}
发表评论后编辑:
我将 String 转换为 Integer 的唯一方法是:
{% assign limit = section.limit | plus: 0 %}
然后{% for product in category.products | limit: limit %}
。
和整数到字符串:{% assign str = 1 | append: "" %} => str == "1"