This repository has been archived on 2024-01-30. You can view files and clone it, but cannot push or open issues or pull requests.
docs/templates/index.html
stuebinm ff406a7741 display subsections in index.html
this adds all subsections and their contents to index.html; it also
disables pagination, since that doesn't seem to work too nicely
with anything more than just a single flat list …

Note that this only goes one level deep — if we ever have subsections of
subsections these currently won't show up in the main index.html.
2022-01-06 17:14:59 +01:00

23 lines
674 B
HTML

{% extends "base.html" %}
{% block content %}
<main>
{% for page in section.pages %}
<p>
<h3><a href="{{ page.permalink | safe }}">{{ page.title }}</a></h3>
</p>
{% endfor %}
{% for sub in section.subsections %}
{% set subsection = get_section(path=sub) %}
<p>
<h2><a href="{{ subsection.permalink | safe }}">{{ subsection.title }}</a></h2>
{% for page in subsection.pages %}
<p>
<h3 style="margin-left:1em"><a href="{{ page.permalink | safe }}">{{ page.title }}</a></h3>
</p>
{% endfor %}
</p>
{% endfor %}
</main>
{% endblock content %}