From f930590c2e13f256655a7519ea32bed53b059e17 Mon Sep 17 00:00:00 2001
From: Patrick Kollitsch <83281+davidsneighbour@users.noreply.github.com>
Date: Sun, 17 May 2026 09:33:19 +0000
Subject: [PATCH] fix: show dates in image summaries

---
 layouts/summary-with-image.html |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/layouts/summary-with-image.html b/layouts/summary-with-image.html
index 33bbce3..ac59a06 100644
--- a/layouts/summary-with-image.html
+++ b/layouts/summary-with-image.html
@@ -1,4 +1,17 @@
 {{ $featured_image := partials.Include "func/GetFeaturedImage.html" . }}
+{{ $show_date := and
+    (not .Date.IsZero)
+    (or
+        (and
+            (not (eq false site.Params.ananke.pages.show_date))
+            (not (eq false .Params.ananke.show_date))
+        )
+        (and
+            (eq false site.Params.ananke.pages.show_date)
+            (eq true .Params.ananke.show_date)
+        )
+    )
+}}
 <article class="bb b--black-10">
   <div class="db pv4 ph3 ph0-l dark-gray no-underline">
     <div class="flex-column flex-row-ns flex">
@@ -11,6 +24,11 @@
         </div>
       {{ end }}
       <div class="blah w-100{{ if $featured_image }} w-60-ns {{ compare.Conditional (compare.Eq $.Site.Language.Direction "rtl") "pr3-ns" "pl3-ns" }}{{ end }}">
+        {{ if $show_date }}
+          <time class="f6 db" {{ fmt.Printf `datetime="%s"` (.Date.Format "2006-01-02T15:04:05Z07:00") | safe.HTMLAttr }}>
+            {{- .Date | time.Format (compare.Default "January 2, 2006" .Site.Params.date_format) -}}
+          </time>
+        {{ end }}
         <h1 class="f3 fw1 athelas mt0 lh-title">
           <a href="{{.RelPermalink}}" class="color-inherit dim link">
             {{ .Title }}

--
Gitblit v1.10.0