aboutsummaryrefslogtreecommitdiff
path: root/layouts/posts/list.html
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2019-12-14 13:31:11 +0100
committerAlex Shpak <alex-shpak@users.noreply.github.com>2019-12-14 13:31:11 +0100
commitc4232b6e28a9465256ee70a314ccd6659cc00eb1 (patch)
tree1cccdef871a508f06bd53bf9deff104aa281dab0 /layouts/posts/list.html
parente01674c287fd18c9ef01d11888a83283a2439380 (diff)
#113, Hide date from posts if not specified
Diffstat (limited to 'layouts/posts/list.html')
-rw-r--r--layouts/posts/list.html6
1 files changed, 4 insertions, 2 deletions
diff --git a/layouts/posts/list.html b/layouts/posts/list.html
index ad941bd..3a3eb97 100644
--- a/layouts/posts/list.html
+++ b/layouts/posts/list.html
@@ -2,13 +2,15 @@
{{ $dateFormat := default "January 2, 2006" .Site.Params.BookDateFormat }}
{{ $paginator := .Paginate (where .Pages "Params.hidden" "ne" true) }}
{{ range sort .Paginator.Pages }}
- <article class="markdown">
+ <article class="markdown book-post">
<h2>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h2>
+ {{ with .Date }}
<h5>
- <strong>{{ .Date.Format $dateFormat }}</strong>
+ <strong>{{ .Format $dateFormat }}</strong>
</h5>
+ {{ end }}
<p>
{{- .Summary -}}
{{ if .Truncated }}