订购带有Jekyll/liquid模板的阵列

订购带有Jekyll/liquid模板的阵列,jekyll,liquid,Jekyll,Liquid,我试着做以下几点。 我使用Jekyll创建一个帖子列表,并按类别(周一…周日)排序 我想让他们按时间顺序展示,但杰基会按字母顺序排列 可以和杰基尔安排一次约会吗 我已经在post yaml to mirror monday=1中添加了一个订单密钥。。。星期日=7 然后我尝试用这个顺序键对数组进行排序,但它不起作用 {% for post in posts_collate %} {% capture class %} {{ post.tags | first }} {% endcap

我试着做以下几点。 我使用Jekyll创建一个帖子列表,并按类别(周一…周日)排序 我想让他们按时间顺序展示,但杰基会按字母顺序排列

可以和杰基尔安排一次约会吗

我已经在post yaml to mirror monday=1中添加了一个订单密钥。。。星期日=7

然后我尝试用这个顺序键对数组进行排序,但它不起作用

  {% for post in posts_collate  %}
    {% capture class %} {{ post.tags | first }} {% endcapture%}
    {% capture club %} {{ post.tags | last }} {% endcapture%}

    {% if forloop.first %}
      <h2>our events</h2>
      <h3>{{ class }} & {{ club }}</h3>
      <dl>
    {% endif %}
    {% if post.rel == 'me' %}
      <dt>{{ post.category | sort: 'order' }}</dt> 
      <dd> <a href="{{ BASE_PATH }}{{ post.url }}">{{ post.title }}</a></dd>
    {% endif %}

    {% if forloop.last %}
      </dl>
    {% endif %}
  {% endfor %}
{posts in posts的百分比\u collate%}
{%capture class%}{{post.tags | first}{%endcapture%}
{%capture club%}{{post.tags | last}{%endcapture%}
{%if-forloop.first%}
我们的活动
{{class}&{{club}
{%endif%}
{%if post.rel='me%}
{{post.category | sort:'order'}
{%endif%}
{%if-forloop.last%}
{%endif%}
{%endfor%}

我在谷歌的大机器上找不到任何信息,所以我不确定这是否可行。

好的,我不确定是否可以进行这种排序,但我有点作弊 (•u______________

我刚刚重命名了我想订购的帖子,具体日期如下:

0000-00-01-firstpost 等等


现在为我做这件事,但是如果有更聪明的方法来做的话,我准备好了(^ __^)

没有插件或自定义函数是做不到的。尽管如此,我们仍在努力在下一个版本中实现这一点:然后看起来:

{% for tag in site.tags order:ascending %} 
   ...
{% endfor %}

只需在
for
语句中添加
reversed

 {% for post in site.posts reversed %}
   ...
 {% endfor %}

您好,该功能是否已在当前版本中?如果没有,如何在Shopify中安装插件?ThanksJekyll 1.4.3依赖于liquid 2.5.5,显然尚未实施。