{% include hooks/navbar-prehook.html %} {% assign documents = site.documents | where: "collection", site.theme-settings.collection | where_exp: "page", "page.chapnum != null" %} {% if page.subsite %} {% assign documents = documents | where: "subsite", page.subsite %} {% endif %} {% assign pages = documents | where_exp: "page", "page.pagenum != null" | sort: "pagenum" %} {% assign indices = documents | where_exp: "page", "page.pagenum == null" | sort: "chapnum" %} {% for index in indices %}

{% if index.icon %}{% assign components = index.url | split: "/" %} {% endif %}{{ index.chapter | escape | replace: " ", " " }}

    {% if site.theme-settings.indices == true and index.layout == "chapter-index" %} Index {% endif %} {% assign chapter_pages = pages | where: "chapter", index.chapter %} {% for p in chapter_pages %} {{ p.title | escape | replace: " ", " " }} {% endfor %}
{% endfor %} {% include hooks/navbar-posthook.html %}