From a28a93898e78def058b7c6c36983435ff1355aab Mon Sep 17 00:00:00 2001 From: Kiril Isakov Date: Mon, 8 May 2023 16:38:12 +0200 Subject: [PATCH] fix date "Monday, Jan 1, 0001" rendered when no date is provided in index.md --- layouts/_default/single.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 6bcaf8df..34c58b59 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -7,8 +7,8 @@

{{.Title}}

- {{ dateFormat "Monday, Jan 2, 2006" .Date }} - {{if .Params.author}}Author: {{.Params.Author}}{{end}} + {{ if .Date }}{{ dateFormat "Monday, Jan 2, 2006" .Date }}{{ end }} + {{ if .Params.author}}Author: {{.Params.Author}}{{ end }}
{{.Content}}