diff options
author | Nicholas Johnson <nick@nicholasjohnson.ch> | 2023-08-25 00:00:00 +0000 |
---|---|---|
committer | Nicholas Johnson <nick@nicholasjohnson.ch> | 2023-08-25 00:00:00 +0000 |
commit | 76c9a5575daf087dcc7a7ca8db84778e296ca1636bc8b401de587336fed1c5c6 (patch) | |
tree | f9310cf214be036bef7036e129651a12bab283b8cdb7b6ff58adf3fc1de14117 /layouts/term | |
parent | 0ff4039f0947a7e51a9b982f3ad900e5187e554d7747e2795cf9953c41211da0 (diff) | |
download | hugo-theme-journal-76c9a5575daf087dcc7a7ca8db84778e296ca1636bc8b401de587336fed1c5c6.tar.gz hugo-theme-journal-76c9a5575daf087dcc7a7ca8db84778e296ca1636bc8b401de587336fed1c5c6.zip |
Simplify term entry printing logic
Diffstat (limited to 'layouts/term')
-rw-r--r-- | layouts/term/term.gmi | 9 |
1 files changed, 2 insertions, 7 deletions
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 |