Reputation: 27594
In Jekyll / Liquid, one can add an item to the end of a list by running:
{% assign list = list | push: item %}
Is there a way to add an item to the start of a list?
Upvotes: 0
Views: 328
Reputation: 5444
Use the unshift filter
unshift
{% assign list = list | unshift: item %}
Upvotes: 1