summaryrefslogtreecommitdiff
path: root/layouts/partials/metadata.gmi
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/metadata.gmi')
-rw-r--r--layouts/partials/metadata.gmi11
1 files changed, 11 insertions, 0 deletions
diff --git a/layouts/partials/metadata.gmi b/layouts/partials/metadata.gmi
new file mode 100644
index 0000000..3984494
--- /dev/null
+++ b/layouts/partials/metadata.gmi
@@ -0,0 +1,11 @@
+{{ $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 }} - {{ .ReadingTime }} minute read
+=> .{{ .RelPermalink }} {{ .Title }}
+
+{{ end }}
+{{- range last 1 (where .Site.RegularPages.ByTitle "Section" "entry").ByPublishDate.Reverse }}
+{{- $dateFormat := .Site.Params.dateFormat | default "2 Jan 2006" }}
+{{- .PublishDate.Format $dateFormat }} - {{ .ReadingTime }} minute read
+=> .{{ .RelPermalink }} {{ .Title }}{{ end }}