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:
@@ -28,9 +28,15 @@ 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 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 }}
|
{{ date | dateDisplay }}
|
||||||
</time></time-difference>
|
</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 %}
|
{% if category | withoutGardenTags %}
|
||||||
<ul class="post-categories flex flex-wrap gap-2 list-none p-0 m-0" role="list" aria-label="Categories">
|
<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 #}
|
{# Handle both string and array categories #}
|
||||||
@@ -268,7 +274,7 @@ withBlogSidebar: true
|
|||||||
"@id": "{{ site.url }}{{ page.url }}"
|
"@id": "{{ site.url }}{{ page.url }}"
|
||||||
},
|
},
|
||||||
"datePublished": "{{ date.toISOString() }}",
|
"datePublished": "{{ date.toISOString() }}",
|
||||||
"dateModified": "{{ date.toISOString() }}",
|
"dateModified": "{{ (updated | isoDate) if updated else date.toISOString() }}",
|
||||||
"author": {
|
"author": {
|
||||||
"@type": "Person",
|
"@type": "Person",
|
||||||
"name": "{{ site.author.name }}",
|
"name": "{{ site.author.name }}",
|
||||||
|
|||||||
Reference in New Issue
Block a user