diff options
author | tom <tom@mdashx.com> | 2020-12-07 01:12:20 +0300 |
---|---|---|
committer | tom <tom@mdashx.com> | 2020-12-07 01:12:20 +0300 |
commit | 868ea3706c5526e74ceab76c99e1718749f21ce9 (patch) | |
tree | 1138f13bdd55c692b36290ec8abd484db66f67e3 | |
parent | 3686bc63b6e29d24b8ef4ab5e4a8a65b3ea46ae5 (diff) |
Global showdate param
-rw-r--r-- | layouts/_default/single.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index f838367..714432b 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,11 +1,15 @@ {{ define "main" }} +{{ $showdate := true }} + +{{ if isset $.Site.Params "showdate" }}{{ $showdate = $.Site.Params.showdate }}{{ end }} + {{ with .Param "skipTitle" }} {{ else }} <h2>{{ $.Title }}</h2> {{ end }} -{{ if .PublishDate }} +{{ if (and .PublishDate $showdate )}} <em>{{ .PublishDate.Format "January 2, 2006" }}</em> {{ end }} |