From 9bb9989fca490bfac69ea4387ccae1e9ec3ec23cf7f47a401e241ee43562f8a3 Mon Sep 17 00:00:00 2001 From: Nicholas Johnson <> Date: Sat, 26 Jul 2025 00:00:00 +0000 Subject: Migrate fully to Hugo's new template system This was the only way I could get term pages to consistently render correctly. --- layouts/term.gemini_atom.xml | 55 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 layouts/term.gemini_atom.xml (limited to 'layouts/term.gemini_atom.xml') diff --git a/layouts/term.gemini_atom.xml b/layouts/term.gemini_atom.xml new file mode 100644 index 0000000..287bcc4 --- /dev/null +++ b/layouts/term.gemini_atom.xml @@ -0,0 +1,55 @@ +{{/*Deprecate site.Author.name in favor of site.Params.author.name */}} +{{- $authorName := "" }} +{{- with site.Params.author }} + {{- if reflect.IsMap . }} + {{- with .name }} + {{- $authorName = . }} + {{- end }} + {{- else }} + {{- $authorName = . }} + {{- end }} +{{- else }} + {{- with site.Author.name }} + {{- $authorName = . }} + {{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }} + {{- end }} +{{- end }} + +{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}} +{{- $authorEmail := "" }} +{{- with site.Params.author }} + {{- if reflect.IsMap . }} + {{- with .email }} + {{- $authorEmail = . }} + {{- end }} + {{- end }} +{{- else }} + {{- with site.Author.email }} + {{- $authorEmail = . }} + {{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }} + {{- end }} +{{- end -}} + +{{ "" | safeHTML }} + + {{ .Permalink | strings.TrimSuffix "index.gmi" }} + {{ .Site.Title }} + {{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }} + + + {{- with $authorName }} + + {{ . }} + {{- with $authorEmail }} + {{ . }}{{ end }} + {{ end }} + Hugo -- gohugo.io + {{ replace .Site.Copyright "{currentYear}" (now.Format "2006") }} + {{ .Site.Params.Description }}{{ range first .Site.Config.Services.RSS.Limit .Data.Pages }} + + {{ .Permalink | strings.TrimSuffix "index.gmi" }} + {{ .Title }} + {{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }} + + {{ end }} + -- cgit v1.2.3