I'm on version 3.8.4. Say I have made an array that I want to print in reverse order:
{% assign words = 'swag, yolo, hi' | split: ", " | sort: 'last' %}
{% for word in words %}
<p>{{word}}</p>
{% endfor %}
Even with sort: 'last'
, this will print as:
swag
yolo
hi
Maybe it's 'first'
. The output is still
swag
yolo
hi
with 'first'
.
I've been trying to sort a collection in Jekyll by some page front-matter, and sort
works--it lists everything in order, by the numbers I gave them (not by title or date), first to last, but what if I want it last to first? If I sort: 'last'
, it's still sorted first to last. Is the last
option broken? Am I doing something wrong?
Here's a screenshot: https://i.imgur.com/7Fxep9A.png