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?
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 %}
?
Not to contradict Yi Zeng, but you can also solve this issue using:
{% unless forloop.last %}something{% endunless %}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With