Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/budparr/gohugo-theme-ananke.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Anderson <andrsn84@gmail.com>2021-10-01 20:14:07 +0300
committerGitHub <noreply@github.com>2021-10-01 20:14:07 +0300
commit1ae24ada388e9581878c80b747e8afa10cc22475 (patch)
treefdae3efdf7c0721a05d873d68d742ebd05c6eec6
parent597a631988526380e81061f778f85eff43653a5d (diff)
Only print article date if it is non-zero (#397)
-rwxr-xr-xlayouts/_default/single.html2
1 files changed, 2 insertions, 0 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 7cf01e2..2f2eed3 100755
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -30,9 +30,11 @@
</p>
{{ end }}
{{/* Hugo uses Go's date formatting is set by example. Here are two formats */}}
+ {{ if not .Date.IsZero }}
<time class="f6 mv4 dib tracked" {{ printf `datetime="%s"` (.Date.Format "2006-01-02T15:04:05Z07:00") | safeHTMLAttr }}>
{{- .Date.Format "January 2, 2006" -}}
</time>
+ {{end}}
{{/*
Show "reading time" and "word count" but only if one of the following are true: