github.com/choria-io/go-choria@v0.28.1-0.20240416190746-b3bf9c7d5a45/docs/themes/hugo-theme-relearn/layouts/_default/rss.xml (about) 1 {{- partialCached "page-meta.hugo" . .RelPermalink }} 2 {{- /* Deprecate site.Author.email in favor of site.Params.author.email */}} 3 {{- $authorEmail := "" }} 4 {{- if and .Site.Params.author (reflect.IsMap .Site.Params.author) .Site.Params.author.email }} 5 {{- $authorEmail = .Site.Params.author.email }} 6 {{- else }} 7 {{- with .Site.Author.email }} 8 {{- $authorEmail = . }} 9 {{- $hugoVersion := "0.120.0" }} 10 {{- if ge hugo.Version $hugoVersion }} 11 {{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }} 12 {{- end }} 13 {{- end }} 14 {{- end }} 15 16 {{- /* Deprecate site.Author.name in favor of site.Params.author.name */}} 17 {{- $authorName := partialCached "authorname.hugo" . }} 18 19 {{- $pages := .Pages }} 20 {{- $limit := .Site.Config.Services.RSS.Limit }} 21 {{- if ge $limit 1 }} 22 {{- $pages = $pages | first $limit }} 23 {{- end }} 24 25 {{- $page := . }} 26 {{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} 27 <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 28 <channel> 29 <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }}</title> 30 <link>{{ partial "relLangPrettyUglyURL.hugo" (dict "to" . "abs" true) }}</link> 31 <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}</description> 32 <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} 33 <language>{{ . }}</language>{{end}}{{ with $authorEmail }} 34 <managingEditor>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with $authorEmail }} 35 <webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with .Site.Copyright }} 36 <copyright>{{ . }}</copyright>{{ end }}{{ if not .Date.IsZero }} 37 <lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} 38 {{- with .OutputFormats.Get "rss" }} 39 {{ printf "<atom:link href=%q rel=\"self\" type=%q />" ( partial "relLangPrettyUglyURL.hugo" (dict "to" . "abs" true)) .MediaType | safeHTML }} 40 {{- end -}} 41 {{- range $pages }} 42 {{- $relearnIsHiddenFrom := index ($page.Scratch.Get "relearnIsHiddenFrom") .RelPermalink }} 43 {{- if and .Permalink .Title (or (not $relearnIsHiddenFrom) (ne .Site.Params.disableSeoHiddenPages true) ) }} 44 <item> 45 <title>{{ .Title }}</title> 46 <link>{{ partial "relLangPrettyUglyURL.hugo" (dict "to" . "abs" true) }}</link> 47 <pubDate>{{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> 48 {{- with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }} 49 <guid>{{ partial "relLangPrettyUglyURL.hugo" (dict "to" . "abs" true) }}</guid> 50 <description>{{ .Summary | transform.XMLEscape | safeHTML }}</description> 51 </item> 52 {{- end }} 53 {{- end }} 54 </channel> 55 </rss>