Collections 带有子目录和自己的index.html的Jekyll集合

Collections 带有子目录和自己的index.html的Jekyll集合,collections,tags,jekyll,subdirectory,static-site,Collections,Tags,Jekyll,Subdirectory,Static Site,您好,提前感谢您对我的问题的任何帮助/建议 背景信息:我一直在使用Jekyll静态站点生成器,我使用的主题有一个博客功能是posts这已经在使用中。 现有循环显示其目录中的所有标记文件: {%assign posts=paginator.posts |其中:“lang”,page.lang%}{%for posts in posts%} 我目前正在使用Jekyll3.8.5 目标:创建第二个博客,即注释。但是,这个博客应该能够容纳3个子目录,并可以选择在3个子目录之间进行过滤。顶级目录是“发行说

您好,提前感谢您对我的问题的任何帮助/建议

背景信息:我一直在使用Jekyll静态站点生成器,我使用的主题有一个博客功能是
posts
这已经在使用中。 现有循环显示其目录中的所有标记文件:
{%assign posts=paginator.posts |其中:“lang”,page.lang%}{%for posts in posts%}

我目前正在使用Jekyll3.8.5

目标:创建第二个博客,即
注释
。但是,这个博客应该能够容纳3个子目录,并可以选择在3个子目录之间进行过滤。顶级目录是“发行说明”。此页面应显示所有子目录。 每个子目录应仅显示其特定文件,即iOS仅显示每个标记文件中按类别“iOS”筛选的特定发行说明

我想创建第二个名为“发布说明”的博客,其中包含3个不同的子集合(类别),分别是Android、iOS和Windows;发行说明的每个子目录将承载多个标记文件,这些文件都将是相同类型(相同的标记或类别)

结构

_releasenotes
  - ios
  - android
  - windows
我已尝试使用此线程中的方法实现该函数:[https://stackoverflow.com/a/38870168/1914835][1] 没有完全成功

方法:为
创建单个index.html\u releasenotes
这将使用此循环显示该目录中的所有标记文件:

{% assign notes = site.releasenotes| sort:'title' %}
{% for note in notes %}
{% if page.url != note.url and include.category == nil or note.url contains include.category %}
<a href={{ note.url | prepend: site.baseurl }}>{{note.title}}</a>
{% endif %}
{% endfor %}
结果:一旦网站建立,它将用原始的site index.html替换创建的index.html,这与目的背道而驰。 每个子集合都有自己的“index.html”,用于循环其中的所有MD文件。但是,Jekyll不会为每个集合使用提供的索引页,而是生成自己的index.html作为(错误的)“登录页”

Jekyll生成
releasenotes/index/index.html
:(

给我:

public
- releasenotes
    - index.html (the original site index.html)
    /ios
    /android
    /windows
    /index/index.html (mine that includes another html)
而不是:

public
- releasenotes
    - index.html (Mine which includes another html)
    /ios
    /android
    /windows
我如何配置Jekyll,使其不将我的index.html(在_releasenotes中)转换为子目录,而是使用我创建的index.html作为发行说明的条目页面? 请记住,我可以在发行说明文件夹和子文件夹中查看所有发行说明,我应该能够在iOS、Android和Windows之间进行筛选。

以下是收集配置:

collections:
  releasenotes:
    output: true
    android:
      output: true
    ios:
      output: true
    portal:
      output: true

由于默认的永久链接设置,
\u releasenotes/index.html
集合项文件被输出到
releasenotes/index/index.html

您可以通过在该文件的前面设置以下内容来覆盖它:

permalink: /releasenotes/index.html
permalink: /releasenotes/index.html