{{- $allowedRssSections := (slice "post") -}} {{- $baseurl := .Site.BaseURL -}} {{- $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 -}} {{- printf "" | safeHTML }} {{ .Site.Title }} {{- $perm := replace .Permalink "/gemini" "" 1 -}} {{- $alt := .Site.BaseURL | replaceRE `https?://(.+?)` "gemini://$1" -}} {{ printf "" $perm | safeHTML }} {{ printf "" $alt | safeHTML }} {{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }} {{ .Site.Author.name }} {{ .Site.BaseURL | replaceRE `https?://(.+?)` "gemini://$1" }} {{ $perm }} {{ range $pages }} {{ if in $allowedRssSections .Section }} {{ .Title }} {{- $entryperm := .Permalink | replaceRE `https?://(.+?)` "gemini://$1" -}} {{ printf "" $entryperm | safeHTML }} {{ $entryperm }} {{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }} {{ .Lastmod.Format "2006-01-02T15:04:05-0700" | safeHTML }} {{ if isset .Params "subtitle" }}{{ .Params.subtitle }}{{ else }}{{ .Summary | html }}{{ end }} {{ end }} {{ end }}