From 81d13b593630addf136ddf2184eb567aae523d41 Mon Sep 17 00:00:00 2001 From: Ieuan Jenkins Date: Tue, 5 Jan 2021 14:11:32 +0000 Subject: [PATCH] fix: do not render a date if it is not set fixes the issue where posts without a date render a date of "January 1, 0001" --- layouts/_default/single.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index cbb7e74..ff01de6 100755 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -29,10 +29,12 @@

{{ end }} - {{/* Hugo uses Go's date formatting is set by example. Here are two formats */}} + {{/* Hugo uses Go's date formatting is set by example. Here are two formats. */}} + {{ if .Date }} + {{ end }} {{/* Show "reading time" and "word count" but only if one of the following are true: