mirror of https://github.com/theNewDynamic/gohugo-theme-ananke.git

Patrick Kollitsch
15.04.2026 e31a61a4b3f324ae6a8c7f206f804c63727c0edd
feat: add params.ananke.show_date frontmatter

Defaults to 'true'
If set to 'false' it will hide the date on this individual page

Signed-off-by: Patrick Kollitsch <davidsneighbourdev+gh@gmail.com>
1 files modified
2 ■■■ changed files
layouts/single.html 2 ●●● patch | view | raw | blame | history
layouts/single.html
@@ -42,7 +42,7 @@
      </p>
      {{ end }}
      {{/* Hugo uses Go's date formatting is set by example. Here are two formats */}}
      {{ if not .Date.IsZero }}
      {{ if and (not .Date.IsZero) (not (eq false .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>