我是Jekyll和Jekyll-Bootstrap的新人.
我发现这个按类别过滤:
<ul class="posts">
{% for post in site.posts %}
{% if post.categories contains 'demography' %}
<li><span>{{ post.date | date_to_string }}</span> » <a href="{{ BASE_PATH }}{{ post.url }}">{{ post.title }}</a></li>
{% endif %}
{% endfor %}
</ul>
Run Code Online (Sandbox Code Playgroud)
当我尝试组合标签和类别时,它不起作用:
<ul class="posts">
{% for post in site.posts %}
{% if post.categories contains 'demography' and post.tags contains 'R' %} %}
<li><span>{{ post.date | date_to_string }}</span> » <a href="{{ BASE_PATH }}{{ post.url }}">{{ post.title }}</a></li>
{% endif %}
{% endfor %}
</ul>
Run Code Online (Sandbox Code Playgroud)
任何的想法?
提前致谢!
| 归档时间: |
|
| 查看次数: |
8683 次 |
| 最近记录: |