您可以通过迭代网站的标签并使用标签名称索引到数组来完成此操作,类似于以下内容:
{% for post in site.tags.Play %}
<h2>{{ post.title }}</h2>
<time>{{ post.date }}</time>
{% endfor %}
Run Code Online (Sandbox Code Playgroud)
这有点令人困惑,因为它似乎site.tags返回标签的集合,但它实际上包含完整的帖子,按标签索引。
| 归档时间: |
|
| 查看次数: |
556 次 |
| 最近记录: |