mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-25 12:01:37 +01:00
add lastmod support
This commit is contained in:
parent
f625367ff7
commit
ddaf94cd3d
@ -19,6 +19,9 @@
|
|||||||
{{- partial "edit_post.html" . -}}
|
{{- partial "edit_post.html" . -}}
|
||||||
{{- partial "post_canonical.html" . -}}
|
{{- partial "post_canonical.html" . -}}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="post-meta">
|
||||||
|
{{- partial "post_lastmod.html" . -}}
|
||||||
|
</div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</header>
|
</header>
|
||||||
{{- $isHidden := .Params.cover.hidden | default site.Params.cover.hiddenInSingle | default site.Params.cover.hidden }}
|
{{- $isHidden := .Params.cover.hidden | default site.Params.cover.hiddenInSingle | default site.Params.cover.hidden }}
|
||||||
|
6
layouts/partials/post_lastmod.html
Normal file
6
layouts/partials/post_lastmod.html
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{{ $date := .Date.Format "02.01.2006" }}
|
||||||
|
{{ $lastmod := .Lastmod.Format "02.01.2006" }}
|
||||||
|
|
||||||
|
{{- if ne $lastmod $date -}}
|
||||||
|
<span title={{ .Lastmod }}><i>Last updated on {{ .Lastmod | time.Format (default "January 2, 2006" site.Params.DateFormat) }}</i></span>
|
||||||
|
{{- end }}
|
Loading…
Reference in New Issue
Block a user