Reputation: 544
I've updated jekyll and now get this error:
Liquid Exception: Unknown operator forloop in collection.html
Here's the code in question:
{% for tag in site.content_data.tags %}{{ tag }}{% if not forloop.last %}, {% endif %}{% endfor %}
How would I resolve this error?
Upvotes: 9
Views: 3586
Reputation: 61
Not to contradict Yi Zeng, but you can also solve this issue using:
{% unless forloop.last %}something{% endunless %}
Upvotes: 6
Reputation: 32895
I suspect your {% if not forloop.last %}
is not the valid syntax, as I don't see it in the operators section.
Have you tried {% if forloop.last == false %}
?
Upvotes: 19