From 616757e8f0fbca264c7d55ab925bba3b6fea4c1ec8618eb4d1ef1ff5e33837ff Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Sat, 30 Apr 2022 00:00:00 +0000 Subject: Make Atom feed template for Gemini --- layouts/index.gemini_atom.xml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 layouts/index.gemini_atom.xml diff --git a/layouts/index.gemini_atom.xml b/layouts/index.gemini_atom.xml new file mode 100644 index 0000000..eec8857 --- /dev/null +++ b/layouts/index.gemini_atom.xml @@ -0,0 +1,32 @@ +{{ $pctx := . }} +{{- if .IsHome }}{{ $pctx = .Site }}{{ end }} +{{- $pages := slice }} +{{- if or $.IsHome $.IsSection }} +{{- $pages = $pctx.RegularPages }} +{{- else }} +{{- $pages = $pctx.Pages }} +{{- end }} +{{- $limit := .Site.Config.Services.RSS.Limit }} +{{- if ge $limit 1 }} +{{- $pages = $pages | first $limit }} +{{- end -}} + + + {{ replace .Permalink "https://" "gemini://" }} + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }} + {{ .Date.Format "2006-01-02T15:04:05Z" | safeHTML }} + + {{ if not .Date.IsZero }}{{ end }} + + {{ $.Site.Author.name }} + + Hugo -- gohugo.io + {{ $.Site.Copyright }} {{ .Site.Params.beginCopyrightYear }}-{{ now.Format "2006" }} {{ $.Site.Author.name }} + {{ $.Site.Params.Description }}{{ range $pages }} + + {{ replace .Permalink "https://" "gemini://" | safeURL }} + {{ .Title }} + {{ .Date.Format "2006-01-02T15:04:05Z" | safeHTML }} + + {{ end }} + -- cgit v1.2.3