【问题标题】:Include the whole post, not only summary. Jekyll包括整个帖子,而不仅仅是摘要。杰基尔
【发布时间】:2017-12-19 10:11:50
【问题描述】:

我有一个非常菜鸟的问题。我想创建一个页面,其中将显示某个类别的所有帖子。我明白,我应该写一些 {% include %} 标签,但我不明白是哪个。 我有:

{% for post in site.posts %}

<!-- check if post comes from one of page categories-->
  {% assign PostAndPageCategories= page.categories | concat: post.categories %}
  {% capture all_cat %}{{ PostAndPageCategories | join: "," }}{% endcapture %}
  {% capture unique_cat %}{{ PostAndPageCategories |uniq | join: "," }}{% endcapture %}

  {% if all_cat != unique_cat %} 
  <!-- END check if post comes from one of page categories-->
 {% include archive-single.html %}
  {% endif %}

{% endfor %} 

显然,这段代码向我展示了带有预告片的帖子,但我需要显示整个帖子。

我应该如何换行{% include archive-single.html %}

【问题讨论】:

    标签: jekyll


    【解决方案1】:

    我发现 {{post.content}} 而不是 {% include archive-single.html %} 适合我。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-10-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多