summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorNicholas Johnson <nick@nicholasjohnson.ch>2023-08-25 00:00:00 +0000
committerNicholas Johnson <nick@nicholasjohnson.ch>2023-08-25 00:00:00 +0000
commit706dd4517813a9f6275509732d45aee06eed7dbf133cd2b8f457179971ed69ab (patch)
treed9ed7ea89126312d1e0c7bf27f1aaf76a70c80778703b6d71807d35ab8264354 /layouts
parent2e98d3d48c321deb101cd0b33c67d22adb6efee7a176c84e9f0d723bc7b08cdf (diff)
downloadhugo-theme-journal-706dd4517813a9f6275509732d45aee06eed7dbf133cd2b8f457179971ed69ab.tar.gz
hugo-theme-journal-706dd4517813a9f6275509732d45aee06eed7dbf133cd2b8f457179971ed69ab.zip
Simplify journal entry printing logic
Diffstat (limited to 'layouts')
-rw-r--r--layouts/index.gmi11
1 files changed, 3 insertions, 8 deletions
diff --git a/layouts/index.gmi b/layouts/index.gmi
index 8fa1593..1b66945 100644
--- a/layouts/index.gmi
+++ b/layouts/index.gmi
@@ -10,15 +10,10 @@
=> {{ .URL }} {{ emojify ":link:" | safeHTML }} {{ .Name | safeHTML }}
{{ end }}
-## {{ i18n "journalEntries" }}
+## {{ i18n "journalEntries" -}}
+{{ range (where .Site.RegularPages.ByTitle "Section" "entry").ByPublishDate.Reverse }}
-{{ $entriesMinusOne := sub (len (where .Site.RegularPages.ByTitle "Section" "entry")) 1 -}}
-{{ range first $entriesMinusOne (where .Site.RegularPages.ByTitle "Section" "entry").ByPublishDate.Reverse -}}
-{{ partial "metadata.gmi" . }}
-
-{{ end -}}
-
-{{ range last 1 (where .Site.RegularPages.ByTitle "Section" "entry").ByPublishDate.Reverse -}}
{{ partial "metadata.gmi" . -}}
{{ end -}}
+
{{ end }} \ No newline at end of file