#113, Hide date from posts if not specified

This commit is contained in:
Alex Shpak
2019-12-14 13:31:11 +01:00
parent e01674c287
commit c4232b6e28
2 changed files with 16 additions and 12 deletions
+12 -10
View File
@@ -1,14 +1,16 @@
{{ define "main" }}
{{ $dateFormat := default "January 2, 2006" .Site.Params.BookDateFormat }}
<header class="markdown">
<h1>{{ .Title }}</h1>
<h5>
<strong>{{ .Date.Format $dateFormat }}</strong>
</h5>
</header>
<article class="markdown">
{{- .Content -}}
</article>
{{ $dateFormat := default "January 2, 2006" .Site.Params.BookDateFormat }}
<header class="markdown">
<h1>{{ .Title }}</h1>
{{ with .Date }}
<h5>
<strong>{{ .Format $dateFormat }}</strong>
</h5>
{{ end }}
</header>
<article class="markdown">
{{- .Content -}}
</article>
{{ end }}
{{ define "toc" }}