templates/page: make categories and contexts optional

This commit is contained in:
Clayton Craft 2023-02-10 09:56:24 -08:00
parent 7daa254c0b
commit 1e0153eb2f
No known key found for this signature in database
GPG key ID: 4A4CED6D7EDF950A

View file

@ -37,12 +37,16 @@ Table of contents
{% for tag in page.taxonomies.tags %}
<a href="/tags/{{ tag | slugify }}">#{{ tag }}</a>
{% endfor %}
{% if page.taxonomies.categories %}
{% for category in page.taxonomies.categories %}
<a href="/categories/{{ category | slugify }}">+{{ category }}</a>
{% endfor %}
{% endif %}
{% if page.taxonomies.contexts %}
{% for context in page.taxonomies.contexts %}
<a href="/contexts/{{ context | slugify }}">@{{ context }}</a>
{% endfor %}
{% endif %}
{% endif %}
</p>
{% endblock footer %}