Check if the page has any tags before looking for specific tag

This commit is contained in:
Helen Chong 2024-04-17 23:52:11 +08:00
parent f65d2a9247
commit 51d6fdd300
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ metadata:
{{ content | safe }}
</article>
{% if tags.includes("posts") %}
{% if tags and tags.includes("posts") %}
{% include "blog/blognav.njk" %}
{% endif %}
</div>

View File

@ -18,7 +18,7 @@ layout: main/base
{{ content | safe }}
</div>
{% if tags.includes("blog pages") %}
{% if tags and tags.includes("blog pages") %}
{% include "blog/blognav.njk" %}
{% endif %}
</div>