diff options
author | Nicholas Johnson <nick@nicholasjohnson.ch> | 2023-02-24 00:00:00 +0000 |
---|---|---|
committer | Nicholas Johnson <nick@nicholasjohnson.ch> | 2023-02-24 00:00:00 +0000 |
commit | dc89efa0d1ba80e8a7c61ddd2d0d4243cc82e52fb2c9104311b4ba5e2af81ff6 (patch) | |
tree | 377e286c42216fe50949c2e53a3c5aecfebf3d60be70a4d800f272370157191a /layouts/index.gmi | |
parent | 4200dccb4372c7095e151803364c3f34eaa466327a2fc015a7a89065e4742b22 (diff) | |
download | hugo-theme-journal-dc89efa0d1ba80e8a7c61ddd2d0d4243cc82e52fb2c9104311b4ba5e2af81ff6.tar.gz hugo-theme-journal-dc89efa0d1ba80e8a7c61ddd2d0d4243cc82e52fb2c9104311b4ba5e2af81ff6.zip |
Implement term Atom feeds
Diffstat (limited to 'layouts/index.gmi')
-rw-r--r-- | layouts/index.gmi | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/layouts/index.gmi b/layouts/index.gmi index ae45ded..e629fe7 100644 --- a/layouts/index.gmi +++ b/layouts/index.gmi @@ -7,4 +7,12 @@ => {{ .URL }} {{ emojify ":link:" | safeHTML }} {{ .Name | safeHTML }} {{ end }} ## Journal Entries -{{ partial "metadata.gmi" . }}{{ end }} +{{ $entriesMinusOne := sub (len (where .Site.RegularPages.ByTitle "Section" "entry").ByPublishDate.Reverse) 1 }} +{{- range first $entriesMinusOne (where .Site.RegularPages.ByTitle "Section" "entry").ByPublishDate.Reverse }} +{{- partial "metadata.gmi" . }} +{{ end }}{{- if gt (len .Data.Pages) 1 }} + +{{- range last 1 (where .Site.RegularPages.ByTitle "Section" "entry").ByPublishDate.Reverse }} +{{- partial "metadata.gmi" . }}{{ end }} +{{- end }} +{{- end }} |