mirror of
https://github.com/thegeeklab/hugo-geekblog.git
synced 2024-11-28 15:50:36 +00:00
use .Lastmod instead of .Date on posts
This commit is contained in:
parent
c2d910f078
commit
536f5322f3
@ -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
|
||||
|
@ -4,6 +4,7 @@ title: Geekblog
|
||||
theme: hugo-geekblog
|
||||
pygmentsUseClasses: true
|
||||
pygmentsCodeFences: true
|
||||
enableGitInfo: true
|
||||
|
||||
paginate: 5
|
||||
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user