Jekyll集合-跳过索引页

Jekyll集合-跳过索引页,jekyll,Jekyll,我的Jekyll站点中有以下文件夹结构: ... _machine-learning |- my-first-post.md |- index.html ... 我想安排我的网站,这样当有人访问http://example.com/machine-learning/,他们可以看到所有收藏页面整齐地列出 为此,我将以下内容添加到我的index.html: <h1 class="page-heading">Machine Learning</h1> <ul cla

我的Jekyll站点中有以下文件夹结构:

...
_machine-learning
|- my-first-post.md
|- index.html 
...
我想安排我的网站,这样当有人访问
http://example.com/machine-learning/
,他们可以看到所有收藏页面整齐地列出

为此,我将以下内容添加到我的
index.html

<h1 class="page-heading">Machine Learning</h1>

<ul class="post-list">
  {% for item in site.machine-learning %}
    <a href="{{ item.url | prepend: item.baseurl }}">{{ item.title }}</a>
  {% endfor %}
</ul>
机器学习
    {site.machine-learning%中项目的%s} {%endfor%}
这很好,但唯一的问题是它在其中也显示了我的
index.html
,使一切看起来都很混乱


我做错什么了吗?如何遍历集合,跳过索引?

我刚刚更改了文件夹结构,将
index.html
文件从
machine learning/
集合内部移动到根文件夹
machine learning.html
。URL保持不变(example.com/machine learning),它不会显示在
site.machine learning
列表中

之前:

...
_machine-learning
|- my-first-post.md
|- index.html 
...
之后:

...
machine-learning.html
_machine-learning
|- my-first-post.md
...

这个想法是重现你的问题。提供一个存储库url,并澄清使一切看起来像一团乱,因为它与上下文无关。感谢David的来电。结果表明这是预期的行为,所以结束这个问题