From b5c3919fe891a965b0051b0ea10f3121d049b34080165f95b92a65e739526c5c Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Sat, 25 Feb 2023 00:00:00 +0000 Subject: Organize layouts --- layouts/term/term.gmi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 layouts/term/term.gmi (limited to 'layouts/term/term.gmi') diff --git a/layouts/term/term.gmi b/layouts/term/term.gmi new file mode 100644 index 0000000..4beb9ea --- /dev/null +++ b/layouts/term/term.gmi @@ -0,0 +1,19 @@ +{{ define "main" -}} +=> / {{ emojify ":link:" | safeHTML }} Return to homepage + + +# {{ .Type | singularize | humanize | safeHTML }} "{{ .Title | safeHTML }}" +## Feeds +=> {{ .RelPermalink | replaceRE `(?m)index.gmi$` "atom.xml" | safeHTML }} {{ emojify ":link:" | safeHTML }} Atom Feed + +## Journal Entries +{{ $entriesMinusOne := sub (len (where .Site.RegularPages.ByTitle "Section" "entry").ByPublishDate.Reverse) 1 }} +{{- range first $entriesMinusOne .Data.Pages.ByPublishDate.Reverse }} +{{- partial "metadata.gmi" . }} +{{ end }} +{{- if gt (len .Data.Pages) 1 }} + +{{- range last 1 .Data.Pages.ByPublishDate.Reverse }} +{{- partial "metadata.gmi" . }}{{ end }} +{{- end }} +{{- end }} -- cgit v1.2.3