我想制作一个分类页面.
{% for post in site.categories[CATEGORY_NAME] %}
<li><a href="{{ post.url }}">{{ post.title }}</a> ({{post.date|date:"%-d %B %Y"}})</li>
{% endfor %}
Run Code Online (Sandbox Code Playgroud)
是否可以使用页面参数填写CATEGORY_NAME?然后我可以有一个文件category.html可以作为多个类别的索引页面(即category.html?name=food和category.html?name=animals.
我找到了一些处理这个问题的插件,但是要求插件似乎有些过分.
这是我能找到的最相关的论坛帖子.
https://groups.google.com/forum/#!topic/jekyll-rb/y-dq-63Uvy4
如果没有插件就无法做到这一点,有充分的理由吗?
| 归档时间: |
|
| 查看次数: |
1229 次 |
| 最近记录: |