diff options
author | Alex Williams <smirlie@googlemail.com> | 2018-08-15 16:54:01 +0300 |
---|---|---|
committer | Curtis Timson <curt@live.co.uk> | 2018-08-15 16:54:01 +0300 |
commit | b8d1ba600b75e232734f91c3d2530ce3091ab003 (patch) | |
tree | 2f556067ed7e537f41bfe0ff513d6e00ea7c925a /layouts | |
parent | ffc507b588220017b2d789d03dc35f2afc150142 (diff) |
Fix post templates to not show date if it is unset #50 (#51)4.2.1
* Fix post templates to not show date if it is unset #50
* Updating example site to have a post without date
* Remove date rather than setting to false
* Bump version and update content post description
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/single.html | 2 | ||||
-rw-r--r-- | layouts/partials/posts/featured.html | 2 | ||||
-rw-r--r-- | layouts/partials/posts/list.html | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 991bcff..cae3cea 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -13,7 +13,7 @@ <!-- Post --> <section class="post"> <header class="major"> - {{ if .Date }} + {{ if not .Date.IsZero }} <span class="date">{{ .Date.Format "January 2, 2006" }}</span> {{ end }} <h1>{{ .Title }}</h1> diff --git a/layouts/partials/posts/featured.html b/layouts/partials/posts/featured.html index 53ad713..1a03c76 100644 --- a/layouts/partials/posts/featured.html +++ b/layouts/partials/posts/featured.html @@ -3,7 +3,7 @@ {{ range .firstpost }} <article class="post featured"> <header class="major"> - {{ if .Date }} + {{ if not .Date.IsZero }} <span class="date">{{ .Date.Format "January 2, 2006" }}</span> {{ end }} <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2> diff --git a/layouts/partials/posts/list.html b/layouts/partials/posts/list.html index 9bdfebc..8bce904 100644 --- a/layouts/partials/posts/list.html +++ b/layouts/partials/posts/list.html @@ -4,7 +4,7 @@ {{ range .posts.Pages }} <article> <header> - {{ if .Date }} + {{ if not .Date.IsZero }} <span class="date">{{ .Date.Format "January 2, 2006" }}</span> {{ end }} <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2> |