If Lastmod exist add dates to bottom of posts.

This commit is contained in:
Fredrik Jonsson 2017-08-28 11:32:24 +02:00
commit 239044e927
2 changed files with 13 additions and 1 deletions

View file

@ -12,6 +12,8 @@
</header>
<div class="content">
{{ .Content }}
{{- if not .Lastmod.IsZero }}{{ partial "dates.html" . -}}{{ end -}}
</div>
</article>
</main>

View file

@ -0,0 +1,4 @@
<p class="content-dates">
Last modified: {{ .Lastmod.Format ($.Param "dateformat" | default "2 January, 2006") }}<br>
Created: {{ .Date.Format ($.Param "dateformat" | default "2 January, 2006") }}
</p>