From 76c9a5575daf087dcc7a7ca8db84778e296ca1636bc8b401de587336fed1c5c6 Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Fri, 25 Aug 2023 00:00:00 +0000 Subject: Simplify term entry printing logic --- layouts/term/term.gmi | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'layouts/term/term.gmi') diff --git a/layouts/term/term.gmi b/layouts/term/term.gmi index 634eb8d..8d6158f 100644 --- a/layouts/term/term.gmi +++ b/layouts/term/term.gmi @@ -10,15 +10,10 @@ => {{ .RelPermalink | replaceRE `(?m)index.gmi$` "atom.xml" | safeHTML }} {{ emojify ":link:" | safeHTML }} {{ i18n "atomFeed" }} -## {{ i18n "journalEntries" }} +## {{ i18n "journalEntries" -}} -{{ $entriesMinusOne := sub (len .Data.Pages) 1 -}} -{{ range first $entriesMinusOne .Data.Pages.ByPublishDate.Reverse -}} -{{ partial "metadata.gmi" . }} +{{ range .Data.Pages.ByPublishDate.Reverse }} -{{ end -}} - -{{ range last 1 .Data.Pages.ByPublishDate.Reverse -}} {{ partial "metadata.gmi" . -}} {{ end -}} {{ end }} \ No newline at end of file -- cgit v1.2.3