If Lastmod exist add dates to bottom of posts.
This commit is contained in:
parent
59bc1494af
commit
239044e927
2 changed files with 13 additions and 1 deletions
|
|
@ -12,6 +12,8 @@
|
|||
</header>
|
||||
<div class="content">
|
||||
{{ .Content }}
|
||||
|
||||
{{- if not .Lastmod.IsZero }}{{ partial "dates.html" . -}}{{ end -}}
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
|
|
|
|||
4
layouts/partials/dates.html
Normal file
4
layouts/partials/dates.html
Normal 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>
|
||||
Loading…
Reference in a new issue