From 47ad2d183c2487539c07918763ccce3daee2b665 Mon Sep 17 00:00:00 2001 From: crnh <30109443+crnh@users.noreply.github.com> Date: Sat, 5 Jul 2025 15:20:51 +0200 Subject: Add options to hide list dates (#115) Add showListDate parameter, show readTime dot if date is present --- layouts/_default/single.html | 2 +- layouts/partials/post-entry.html | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'layouts') diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 4398ce5..0538658 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -34,7 +34,7 @@ {{- end }} {{- if .Param "readTime" }} - · + {{ if .Date }} · {{ end }} {{- .ReadingTime }} min read {{- end }}
diff --git a/layouts/partials/post-entry.html b/layouts/partials/post-entry.html index 1f57f23..ac1386b 100644 --- a/layouts/partials/post-entry.html +++ b/layouts/partials/post-entry.html @@ -1,11 +1,10 @@{{ .Date | time.Format $dateFormat }}
+ {{ if .Parent.Param "showListDate" | default true }} +{{ .Date | time.Format $dateFormat }}
+ {{ end }}-- cgit v1.2.3