From e416e554e9d2fdd3abae34cc2eb6aa9ff8ed6928 Mon Sep 17 00:00:00 2001
From: Patrick Kollitsch <davidsneighbourdev+gh@gmail.com>
Date: Wed, 15 Apr 2026 10:45:15 +0000
Subject: [PATCH] feat: add global param for params.ananke.show_date frontmatter

---
 config/documentation/params.toml |    6 ++++++
 layouts/single.html              |   14 +++++++++++++-
 2 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/config/documentation/params.toml b/config/documentation/params.toml
index e6f9996..32a3dd9 100644
--- a/config/documentation/params.toml
+++ b/config/documentation/params.toml
@@ -1,5 +1,11 @@
 description = "Documentation for the GoHugo Ananke theme."
 custom_css = ["fixes.css", "highlighting.css"]
 
+[ananke]
+show_recent_posts = false
+
 [ananke.home]
 content_alignment = "left" # options: left, center, right
+
+[ananke.pages]
+show_date = false
diff --git a/layouts/single.html b/layouts/single.html
index 27ed981..9afbcf9 100644
--- a/layouts/single.html
+++ b/layouts/single.html
@@ -42,7 +42,19 @@
       </p>
       {{ end }}
       {{/* Hugo uses Go's date formatting is set by example. Here are two formats */}}
-      {{ if and (not .Date.IsZero) (not (eq false .Params.ananke.show_date)) }}
+      {{ if 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)
+              )
+          )
+      }}
       <time class="f6 mv4 dib tracked" {{ 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>

--
Gitblit v1.10.0