fix: guard date in post.njk against null and use isoDate filter

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
svemagie
2026-03-07 17:29:13 +01:00
co-authored by Claude Sonnet 4.6
parent d2efa1c1d1
commit 7409ebd846
+2 -2
View File
@@ -20,9 +20,9 @@ withBlogSidebar: true
{% endif %} {% endif %}
<div class="post-meta mb-4 sm:mb-6"> <div class="post-meta mb-4 sm:mb-6">
<time-difference><time class="dt-published" datetime="{{ date.toISOString() }}"> {% if date %}<time-difference><time class="dt-published" datetime="{{ date | isoDate }}">
{{ date | dateDisplay }} {{ date | dateDisplay }}
</time></time-difference> </time></time-difference>{% endif %}
{% if category %} {% if category %}
<span class="post-categories"> <span class="post-categories">
{# Handle both string and array categories #} {# Handle both string and array categories #}