summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorNicholas Johnson <mail@nicholasjohnson.ch>2024-11-07 00:00:00 +0000
committerNicholas Johnson <mail@nicholasjohnson.ch>2024-11-07 00:00:00 +0000
commitf8c75e782fa18e846c773c761e36434e8f8591eadad6a405e48170f52ebc8874 (patch)
tree59862291d869826a3c0d9722e0309ed60da9072bdf9db482bd6fb0117c4826fd /layouts
parent9a17e5535ff758f5a8d875030108f3169b620bfd743b1c062818d8715e20b761 (diff)
downloadhugo-theme-journal-f8c75e782fa18e846c773c761e36434e8f8591eadad6a405e48170f52ebc8874.tar.gz
hugo-theme-journal-f8c75e782fa18e846c773c761e36434e8f8591eadad6a405e48170f52ebc8874.zip
Add time element to HTML entry metadata
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/pageinfo.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/pageinfo.html b/layouts/partials/pageinfo.html
index ace8d18..2e5d2b9 100644
--- a/layouts/partials/pageinfo.html
+++ b/layouts/partials/pageinfo.html
@@ -1,2 +1,2 @@
{{ $dateFormat := .Site.Params.dateFormat | default ":date_long" -}}
-{{ emojify ":calendar:" | safeHTML }} {{ .Page.PublishDate | time.Format $dateFormat | safeHTML }} | {{ emojify ":stopwatch:" | safeHTML }} {{ i18n "readingTime" .ReadingTime | safeHTML }}{{ if (.Param (lower (i18n "tags"))) }} | {{ emojify ":label:" | safeHTML }} {{ end }}{{ range $key, $val := (.Param (lower (i18n "tags"))) }}{{ if $key }}, {{ end }}<a class="link" href='{{ relLangURL (lower (i18n "tags")) }}/{{ . | urlize }}/' rel="noreferrer">{{ $val }}</a>{{ end }} \ No newline at end of file
+{{ emojify ":calendar:" | safeHTML }} <time {{ printf "datetime=%q" (.Page.PublishDate | time.Format "2006-01-02T15:04:05-0700") | safeHTMLAttr }}>{{ .Page.PublishDate | time.Format $dateFormat | safeHTML }}</time> | {{ emojify ":stopwatch:" | safeHTML }} <time datetime="PT{{ .ReadingTime }}M">{{ i18n "readingTime" .ReadingTime | safeHTML }}</time>{{ if (.Param (lower (i18n "tags"))) }} | {{ emojify ":label:" | safeHTML }} {{ end }}{{ range $key, $val := (.Param (lower (i18n "tags"))) }}{{ if $key }}, {{ end }}<a class="link" href='{{ relLangURL (lower (i18n "tags")) }}/{{ . | urlize }}/' rel="noreferrer">{{ $val }}</a>{{ end }}