support lastmod
This commit is contained in:
parent
9b3ec3d024
commit
765fe2068d
@ -3,7 +3,25 @@
|
|||||||
<article>
|
<article>
|
||||||
<header>
|
<header>
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
{{ if .Date }}<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "January 02, 2006" }}</time>{{ end }}
|
<!-- Created Date -->
|
||||||
|
{{- $pubdate := .PublishDate.Format "January 02, 2006" }}
|
||||||
|
Created:
|
||||||
|
<time datetime="{{ .PublishDate }}" title="{{ .PublishDate }}">
|
||||||
|
{{ $pubdate }}
|
||||||
|
</time>
|
||||||
|
|
||||||
|
<!-- Last Updated Date -->
|
||||||
|
{{- if .Lastmod }}
|
||||||
|
{{- $lastmod := .Lastmod.Format "January 02, 2006" }}
|
||||||
|
{{- if ne $lastmod $pubdate }}
|
||||||
|
<div class="post-info-last-mod">
|
||||||
|
(Updated:
|
||||||
|
<time datetime="{{ .Lastmod }}" title="{{ .Lastmod }}">
|
||||||
|
{{ $lastmod }}
|
||||||
|
</time>)
|
||||||
|
</div>
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
</header>
|
</header>
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</article>
|
</article>
|
||||||
|
Loading…
Reference in New Issue
Block a user