【发布时间】:2018-10-29 15:19:35
【问题描述】:
我有 post.thumb 和没有 post.thumb 的帖子,我只想在下面的结构中显示带有 post.thumb 的帖子,而不使用帖子的限制和偏移量。
我有一个带有下一个结构的 categories.html:
<section class="type-one">
{% for post in pagination.posts limit:1 Offset:0 %}
<div class="col-md-7">
{% include FirstPostInCategoryNews.html %}
</div>
{% endfor %}
<div class="col-md-5 two_items_incide">
{% for post in pagination.posts limit:2 Offset:1 %}
{% include TwoPostsAfterFirstPostInCatNews.html%}
{% endfor %}
</div>
</section>
<section class="others_posts_in_cat_news">
<div class="col-md-7">
{% for post in pagination.posts limit:7 Offset:3 %}
{% include OtherPostsInCategoryNews.html %}
{% endfor %}
</div>
</section>
为了更好地理解我想要的是this
【问题讨论】:
-
我认为您的帖子需要一个“位置”过滤器,例如:stackoverflow.com/q/24701557/2397550
-
我怎样才能为 paginator.posts 中的帖子的 {% 编写正确的过滤器 |其中:“拇指”、“以图片/新闻开头......”%}
标签: html loops pagination jekyll liquid