有如下的一段代码:
{% for category in site.categories %}
<h3>{{ category | first }} <small>[{{ category | last | size }}]</small></h3>
<ul>
{% for post in category.last %}
<li>{{ post.date | date:"%a, %b %d, %y"}} -> <a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
{% endfor %}
我的疑问是: site.categories
是一个数组,那么像第二个 for
循环中的 category.last
这个方法怎么貌似没有找到相应的资料,可否请前辈们提供点相关方面的资料。thanks in advance :)