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/partials/post-entry.html | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'layouts/partials') 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 @@
- {{ $dateFormat := "2 Jan 2006"}} - {{ with .Site.Params.listDateFormat }} - {{ $dateFormat = .}} - {{ end }} + {{ $dateFormat := .Site.Params.listDateFormat | default "2 Jan 2006" }} -

{{ .Date | time.Format $dateFormat }}

+ {{ if .Parent.Param "showListDate" | default true }} +

{{ .Date | time.Format $dateFormat }}

+ {{ end }}

-- cgit v1.2.3