hide updated date if equal to created date
This commit is contained in:
parent
9e657da94a
commit
e1ed2b5e09
@ -7,7 +7,9 @@
|
|||||||
{{ if .Date }}
|
{{ if .Date }}
|
||||||
<time class="post-date">
|
<time class="post-date">
|
||||||
{{ .Date.Format "2006-01-02" }} ::
|
{{ .Date.Format "2006-01-02" }} ::
|
||||||
{{ if $.Site.Params.showLastUpdated }}
|
{{ $showLastUpdated := ne (.Date.Format "2006-01-02") (.Lastmod.Format "2006-01-02")}}
|
||||||
|
{{ $showLastUpdated := and $showLastUpdated $.Site.Params.showLastUpdated }}
|
||||||
|
{{ if $showLastUpdated }}
|
||||||
[{{or $.Site.Params.updatedDatePrefix "Updated"}} :: {{ .Lastmod.Format "2006-01-02" }}]
|
[{{or $.Site.Params.updatedDatePrefix "Updated"}} :: {{ .Lastmod.Format "2006-01-02" }}]
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</time>
|
</time>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user