2
为什么这样的事情不起作用? 我尝试从今年过滤所有帖子jekyll变量,如果功能
<div class="tiles">
{% for post in site.categories.articles %}
{% capture pubyear %} {{ post.date | date: "%Y" }} {% endcapture %}
{% if pubyear == "2014" %}
{% include post-grid.html %}
{% endif %}
{% endfor %}
</div><!-- /.tiles -->
是!!!!谢谢 – wwwSammy
所以我比较 {%if pubyear ==“2014”%} – wwwSammy
那么我会删除捕获标记和post.date之间的空间,在我已经删除它们的例子。 – marcanuy