Jekyll collections 只显示一些项目

Jekyll collections only show some items

我正在将一些项目从 posts 迁移到 jekyll 中的 collections

当它们是帖子时,所有项目都正确呈现。我将所有文件移动到 _items 目录并将以下内容添加到 _config.yml

collections:
  items:
    output: true
    permalink: /things/:path/

然后我访问了页面中的 collection(标题在每个文件的 yaml front-mater 中)以使用以下方式进行调试:

{% for item in site.items %}
  {{ item.title }}<br />
{% endfor %}

我试过以下方法:

知道会发生什么吗?

更新

https://github.com/jekyll/jekyll/pull/4290 which will go live with version 3.1 - see which version Github Pages uses on https://pages.github.com/versions/

起已修复此问题

这似乎是因为在某些帖子的开头部分 --- 之后有空格。

我在 https://github.com/jekyll/jekyll/issues/4017

的 Jekyll 问题跟踪器上创建了一个问题

您可以在 http://elliz.github.io/jekyll-collection-issue/

查看该问题的演示