Using liquid to sort posts alphabetically

后端 未结 7 1400
借酒劲吻你
借酒劲吻你 2021-02-01 19:45

Is there a way to sort a number of posts alphabetically, using Jekyll?

I have something like this now:

{% for post in site.categories.threat %}


        
7条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-01 20:00

    i tested Christian's great solution in my local site: before the first row there is an empty link (i don't no why) in output, therefore the first link doesn't work, so i modified his code inserting {% if postitems[1] %} before the line {{ postitems[0] }}
    and an {% endif %} after. suggested tanky woo's comment.

提交回复
热议问题