From 0de17c61973ae576a9d86dbeae163a0fb6b5e753 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Mon, 21 Aug 2023 18:06:46 +0200 Subject: [PATCH] Moved condition outside of tags partial --- material/partials/content.html | 2 +- material/partials/tags.html | 40 +++++++++++++++---------------- src/partials/content.html | 2 +- src/partials/tags.html | 44 ++++++++++++++++------------------ 4 files changed, 42 insertions(+), 46 deletions(-) diff --git a/material/partials/content.html b/material/partials/content.html index ff9eedfa0..351ec9869 100644 --- a/material/partials/content.html +++ b/material/partials/content.html @@ -1,7 +1,7 @@ {#- This file was automatically generated - do not edit -#} -{% if "material/tags" in config.plugins %} +{% if "material/tags" in config.plugins and tags %} {% include "partials/tags.html" %} {% endif %} {% include "partials/actions.html" %} diff --git a/material/partials/tags.html b/material/partials/tags.html index 20c28bc3f..128e95954 100644 --- a/material/partials/tags.html +++ b/material/partials/tags.html @@ -4,25 +4,23 @@ {% if page.meta and page.meta.hide %} {% set hidden = "hidden" if "tags" in page.meta.hide %} {% endif %} -{% if tags %} - diff --git a/src/partials/content.html b/src/partials/content.html index 6ec8b42d9..2b78b09ba 100644 --- a/src/partials/content.html +++ b/src/partials/content.html @@ -21,7 +21,7 @@ --> -{% if "material/tags" in config.plugins %} +{% if "material/tags" in config.plugins and tags %} {% include "partials/tags.html" %} {% endif %} diff --git a/src/partials/tags.html b/src/partials/tags.html index ccece1cfe..b3dea295c 100644 --- a/src/partials/tags.html +++ b/src/partials/tags.html @@ -26,29 +26,27 @@ {% endif %} -{% if tags %} -