diff options
author | frosty <passedgoandgot200@disroot.org> | 2025-05-19 08:52:49 -0400 |
---|---|---|
committer | frosty <passedgoandgot200@disroot.org> | 2025-05-19 08:52:49 -0400 |
commit | f8cc991b774ccd1bf99d05c44ba96eb3e46cbd83 (patch) | |
tree | 72b2de4ceae30a84dc7723331d1682d5ccfcaea2 /themes/polaris/layouts/_default/now.html | |
parent | ce8a79066992da40d72ec4164e80a83966631cc1 (diff) |
use 'with' to handle missing dates
Diffstat (limited to 'themes/polaris/layouts/_default/now.html')
-rw-r--r-- | themes/polaris/layouts/_default/now.html | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/themes/polaris/layouts/_default/now.html b/themes/polaris/layouts/_default/now.html index bb77eaf..5bd01c0 100644 --- a/themes/polaris/layouts/_default/now.html +++ b/themes/polaris/layouts/_default/now.html @@ -1,8 +1,8 @@ {{ define "main" }} - <h1>{{ .Title }}</h1> +<h1>{{ .Title }}</h1> {{ .Content }} - <p> - Last updated {{ .Date | time.Format "Jan 02 2006" }}. - <a href="https://nownownow.com/about">What the heck is a “now page”?</a> - </p> +<p> + {{ with .Date }}Last updated {{ . | time.Format "Jan 02 2006" }}.{{ end }} + <a href="https://nownownow.com/about">What the heck is a “now page”?</a> +</p> {{ end }} |