然而,我也分配了一个标记
exclude
我的一些博客帖子和那些我不想展示的帖子。这是可行的,但我没有得到最后10篇博客帖子,而是10减去
排除
这看起来是这样的:
---
layout: page
title: "Last posts"
permalink: /last/
---
### Last posts
{% for post in site.posts limit:10 %}
{% unless post.category == "exclude"%}
* {{ post.date | date_to_string }} » [ {{ post.title }} ]({{ post.url }})
{% endunless %}
{% endfor %}
如何始终显示最后10个非-
排除