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 %}
?
不要与易曾相矛盾,但你也可以用以下方法解决这个问题:
{% unless forloop.last %}something{% endunless %}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.