summaryrefslogtreecommitdiffstats
path: root/layouts
diff options
context:
space:
mode:
authorDSRKafuU2021-03-15 10:47:50 +0800
committerGitHub2021-03-15 10:47:50 +0800
commitf1266a27279cfc6839453737fcf660ac59262105 (patch)
tree603b26d6d2fd8a52b19cc0c18057e60d482ad6c1 /layouts
parentf6383ef95c27208d74c3689d7cfe6f524a8c8f33 (diff)
parentaf932498f71294cfbac3051b3729298032d3750a (diff)
downloadhugo-theme-fuji-f1266a27279cfc6839453737fcf660ac59262105.tar.gz
hugo-theme-fuji-f1266a27279cfc6839453737fcf660ac59262105.tar.bz2
hugo-theme-fuji-f1266a27279cfc6839453737fcf660ac59262105.zip
feat: meta article update date
Merge pull request #73 from alexmitelman/post_updated_at
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/post-meta.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/layouts/partials/post-meta.html b/layouts/partials/post-meta.html
index f450074..794f04c 100644
--- a/layouts/partials/post-meta.html
+++ b/layouts/partials/post-meta.html
@@ -1 +1,5 @@
-<span><i class="iconfont icon-today-sharp"></i>&nbsp;{{ .Date.Format "2006-01-02" }}</span>{{ if .Site.Params.showWordCounter }}<span><i class="iconfont icon-file-tray-sharp"></i>&nbsp;{{ i18n "postMetaWordCount" .WordCount}}</span>{{ end }}{{ if .Site.Params.showReadTime }}<span><i class="iconfont icon-time-sharp"></i>&nbsp;{{ i18n "postMetaReadingTime" .ReadingTime }}</span>{{ end }}<span><i class="iconfont icon-pricetags-sharp"></i>&nbsp;{{ if .Params.tags }}{{ range .Params.tags }}<a href="{{ "/tags/" | relURL }}{{ . | urlize}}">{{ . }}</a>&nbsp;{{ end }}{{ else }}{{ i18n "postMetaNoTag" }}{{ end }}</span>
+<span><i class="iconfont icon-today-sharp"></i>&nbsp;{{ .Date.Format "2006-01-02" }}</span>
+{{ if ne .Date.YearDay .Lastmod.YearDay }}<span><i class="iconfont icon-sync-circle-sharp"></i>&nbsp;{{ dateFormat ( or $.Site.Params.dateFormat "2006-01-02" ) $.Page.Params.LastMod }}</span>{{ end }}
+{{ if .Site.Params.showWordCounter }}<span><i class="iconfont icon-file-tray-sharp"></i>&nbsp;{{ i18n "postMetaWordCount" .WordCount}}</span>{{ end }}
+{{ if .Site.Params.showReadTime }}<span><i class="iconfont icon-time-sharp"></i>&nbsp;{{ i18n "postMetaReadingTime" .ReadingTime }}</span>{{ end }}
+<span><i class="iconfont icon-pricetags-sharp"></i>&nbsp;{{ if .Params.tags }}{{ range .Params.tags }}<a href="{{ "/tags/" | relURL }}{{ . | urlize}}">{{ . }}</a>&nbsp;{{ end }}{{ else }}{{ i18n "postMetaNoTag" }}{{ end }}</span>