diff options
author | crnh <30109443+crnh@users.noreply.github.com> | 2025-07-05 15:20:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-05 15:20:51 +0200 |
commit | 47ad2d183c2487539c07918763ccce3daee2b665 (patch) | |
tree | 5f0410ecee187f6d1e42596eefc17e8afcacff1a /layouts/partials | |
parent | ff0136799bbd006cb04f6527dc9f19f1b09f1cfa (diff) |
Add options to hide list dates (#115)
Add showListDate parameter, show readTime dot if date is present
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/post-entry.html | 9 |
1 files changed, 4 insertions, 5 deletions
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 @@ <div class="post-line"> - {{ $dateFormat := "2 Jan 2006"}} - {{ with .Site.Params.listDateFormat }} - {{ $dateFormat = .}} - {{ end }} + {{ $dateFormat := .Site.Params.listDateFormat | default "2 Jan 2006" }} - <p class="line-date">{{ .Date | time.Format $dateFormat }} </p> + {{ if .Parent.Param "showListDate" | default true }} + <p class="line-date">{{ .Date | time.Format $dateFormat }} </p> + {{ end }} <div> <p class="line-title"> |