Handle the case where a section has no pages

This commit is contained in:
Che 2022-06-02 21:10:23 -04:00
parent e390130d26
commit c88c34eff6

View file

@ -6,14 +6,16 @@
{% if section.word_count > 0 -%} {% if section.word_count > 0 -%}
{{ section.content }} {{ section.content }}
{% else -%} {% else -%}
<h1 class="title"> <h2 class="title"> {{ section.title }} </h2>
{{ section.title }} <h3>Pages:</h3>
</h1>
Pages:
<ul> <ul>
{% for page in section.pages -%} {% if section.pages -%}
<li><a href="{{ page.permalink | safe }}">{{ page.title }}</a></li> {% for page in section.pages -%}
{% endfor -%} <li><a href="{{ page.permalink | safe }}">{{ page.title }}</a></li>
{% endfor -%}
{% else -%}
<li>No pages</li>
{% endif %}
</ul> </ul>
{% endif -%} {% endif -%}
{% endblock content %} {% endblock content %}