feat(blog): add Planted/Tended date labels to post template

Show "Planted:" before publish date and "Tended:" with the updated date
when posts have an `updated` front matter field. Also updates JSON-LD
dateModified to use the updated date when available.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
svemagie
2026-03-17 07:36:51 +01:00
parent 96121a818a
commit 52b453a5b5
+8 -2
View File
@@ -28,9 +28,15 @@ withBlogSidebar: true
{% endif %}
<div class="post-meta mb-4 sm:mb-6">
<time-difference><time class="dt-published font-mono text-sm" datetime="{{ date.toISOString() }}">
<span class="font-mono text-sm">Planted: </span><time-difference><time class="dt-published font-mono text-sm" datetime="{{ date.toISOString() }}">
{{ date | dateDisplay }}
</time></time-difference>
{% if updated %}
<br>
<span class="font-mono text-sm">Tended: </span><time-difference><time class="dt-updated font-mono text-sm" datetime="{{ updated | isoDate }}">
{{ updated | dateDisplay }}
</time></time-difference>
{% endif %}
{% if category | withoutGardenTags %}
<ul class="post-categories flex flex-wrap gap-2 list-none p-0 m-0" role="list" aria-label="Categories">
{# Handle both string and array categories #}
@@ -268,7 +274,7 @@ withBlogSidebar: true
"@id": "{{ site.url }}{{ page.url }}"
},
"datePublished": "{{ date.toISOString() }}",
"dateModified": "{{ date.toISOString() }}",
"dateModified": "{{ (updated | isoDate) if updated else date.toISOString() }}",
"author": {
"@type": "Person",
"name": "{{ site.author.name }}",