use .Lastmod instead of .Date on posts

This commit is contained in:
Robert Kaussow 2020-08-25 23:33:35 +02:00
parent c2d910f078
commit 536f5322f3
Signed by: xoxys
GPG Key ID: 65362AE74AF98B61
4 changed files with 11 additions and 3 deletions

View File

@ -1,2 +1,4 @@
- ENHANCEMENT
- add template for Json Feeds
- slightly change the date formate displayed on posts
- use `.Lastmod` instead of `.Date` on posts
the date on updated posts will be prefixed with `Updated on` string

View File

@ -4,6 +4,7 @@ title: Geekblog
theme: hugo-geekblog
pygmentsUseClasses: true
pygmentsCodeFences: true
enableGitInfo: true
paginate: 5

View File

@ -48,6 +48,7 @@ theme = "hugo-geekblog"
# Required to get well formatted code blocks
pygmentsUseClasses = true
pygmentsCodeFences = true
enableGitInfo = true
disablePathToLower = true
enableGitInfo = true
@ -148,6 +149,7 @@ theme: hugo-geekblog
# Required to get well formatted code blocks
pygmentsUseClasses: true
pygmentsCodeFences: true
enableGitInfo: true
disablePathToLower: true
enableGitInfo: true

View File

@ -24,8 +24,11 @@
<span class="no-wrap">
<svg class="icon date"><use xlink:href="#date"></use></svg>
<span class="gblog-post__tag">
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">
{{ .Date.Day }} {{ .Date.Month }} {{ .Date.Year }}
<time datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">
{{ if ne .Lastmod .Date }}
Updated on
{{ end }}
{{ .Lastmod.Format "Jan 2, 2006" }}
</time>
</span>
</span>