From 32292fe4b1e74c2e9c0368e5a631b39b14029d27 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Fri, 17 Dec 2021 10:00:26 +0200 Subject: [PATCH] allow ommitting tags and categories in posts --- templates/macros.html | 2 ++ templates/page.html | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/templates/macros.html b/templates/macros.html index 65d4ae9..40d2e3f 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -21,10 +21,12 @@ {{ page.taxonomies.categories[0] }} + {% if page.taxonomies.tags %} | {% for tag in page.taxonomies.tags %} {{ tag }}{% if page.taxonomies.tags | length > 1 %}{% if loop.index != page.taxonomies.tags | length %},{% endif %}{% endif %} {% endfor %} + {% endif %} {% endif %} diff --git a/templates/page.html b/templates/page.html index 8753530..e87fcc3 100644 --- a/templates/page.html +++ b/templates/page.html @@ -14,11 +14,15 @@ Home {% if page.taxonomies %} / + {% if page.taxonomies.categories %} {{ page.taxonomies.categories[0] }} + {% endif %} + {% if page.taxonomies.tags %} / {% for tag in page.taxonomies.tags %} {{ tag }}{% if page.taxonomies.tags | length > 1 %}{% if loop.index != page.taxonomies.tags | length %},{% endif %}{% endif %} {% endfor %} + {% endif %} {% endif %}

{% endblock breadcrumb %} @@ -57,7 +61,7 @@ (d.head || d.body).appendChild(s); })(); - + {% endif %} {% endblock main %}