1
0
Fork 0
mirror of https://github.com/panr/hugo-theme-terminal.git synced 2025-03-14 18:29:03 +03:00

Fix issue with lastmod being equal to date

This commit is contained in:
KatieTheDev 2024-11-18 16:12:11 -07:00
parent 26c75170e4
commit 2ee779d93b
No known key found for this signature in database
GPG key ID: 91E4A2687E0A8733
2 changed files with 11 additions and 1 deletions
layouts

View file

@ -8,7 +8,7 @@
<time class="post-date">
{{- partial "post-date" . -}}
{{- if .Lastmod -}}
&nbsp;[{{- partial "post-date" . (dict "Date" .Lastmod) -}}]
&nbsp;[{{- partial "post-lastmod" . -}}]
{{- end -}}
</time>
{{- end -}}

View file

@ -0,0 +1,10 @@
{{- $date := .Lastmod -}}
{{- with .Params.dateFormat -}}
{{- $date | time.Format . -}}
{{- else -}}
{{- with .Site.Params.dateFormat -}}
{{- $date | time.Format . -}}
{{- else -}}
{{- $date | time.Format "2006-01-02" -}}
{{- end -}}
{{- end -}}