summaryrefslogtreecommitdiff
path: root/layouts/partials/metadata.gmi
diff options
context:
space:
mode:
authorNicholas Johnson <nick@nicksphere.ch>2022-09-16 00:00:00 +0000
committerNicholas Johnson <nick@nicksphere.ch>2022-09-16 00:00:00 +0000
commitfe2d028c74ad35151412e94697bc6db06fbeaefdc40a9d65ee707ba0e7695f89 (patch)
tree13acf3c417190f3b88ac1a4b3e51cc114a4750f4b8a08a1d847ef1a5833769b4 /layouts/partials/metadata.gmi
parent8be0f23ffbdd5d89a6122d145e67d7bf735440fc97a58f5d5e8c0f9ca3d79e45 (diff)
downloadhugo-theme-journal-fe2d028c74ad35151412e94697bc6db06fbeaefdc40a9d65ee707ba0e7695f89.tar.gz
hugo-theme-journal-fe2d028c74ad35151412e94697bc6db06fbeaefdc40a9d65ee707ba0e7695f89.zip
Conditionally add page info to top of page
Diffstat (limited to 'layouts/partials/metadata.gmi')
-rw-r--r--layouts/partials/metadata.gmi6
1 files changed, 2 insertions, 4 deletions
diff --git a/layouts/partials/metadata.gmi b/layouts/partials/metadata.gmi
index b697ea0..368c3d3 100644
--- a/layouts/partials/metadata.gmi
+++ b/layouts/partials/metadata.gmi
@@ -1,11 +1,9 @@
{{ $entriesMinusOne := sub (len (where .Site.RegularPages.ByTitle "Section" "entry").ByPublishDate.Reverse) 1 }}
{{- range first $entriesMinusOne (where .Site.RegularPages.ByTitle "Section" "entry").ByPublishDate.Reverse }}
-{{- $dateFormat := .Site.Params.dateFormat | default "2 Jan 2006" -}}
-📆 {{ .PublishDate.Format $dateFormat | safeHTML }} | ⏱️ {{ .ReadingTime | safeHTML }} minute read
+{{- partial "pageinfo" . }}
=> .{{ .RelPermalink }} 🔗 {{ .Title | safeHTML }}
{{ end }}
{{- range last 1 (where .Site.RegularPages.ByTitle "Section" "entry").ByPublishDate.Reverse }}
-{{- $dateFormat := .Site.Params.dateFormat | default "2 Jan 2006" -}}
-📆 {{ .PublishDate.Format $dateFormat | safeHTML }} | ⏱️ {{ .ReadingTime | safeHTML }} minute read
+{{- partial "pageinfo" . }}
=> .{{ .RelPermalink }} 🔗 {{ .Title | safeHTML }}{{ end }}