2023-11-04 05:53:31 -04:00
|
|
|
{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}}
|
|
|
|
{{- $authorEmail := "" }}
|
2023-11-04 06:04:56 -04:00
|
|
|
{{- with site.Params.author }}
|
|
|
|
{{- if reflect.IsMap . }}
|
|
|
|
{{- with .email }}
|
|
|
|
{{- $authorEmail = . }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
2023-11-04 05:53:31 -04:00
|
|
|
{{- else }}
|
|
|
|
{{- with site.Author.email }}
|
|
|
|
{{- $authorEmail = . }}
|
|
|
|
{{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}}
|
|
|
|
{{- $authorName := "" }}
|
2023-11-04 06:04:56 -04:00
|
|
|
{{- with site.Params.author }}
|
|
|
|
{{- if reflect.IsMap . }}
|
|
|
|
{{- with .name }}
|
|
|
|
{{- $authorName = . }}
|
|
|
|
{{- end }}
|
|
|
|
{{- else }}
|
|
|
|
{{- $authorName = . }}
|
|
|
|
{{- end }}
|
2023-11-04 05:53:31 -04:00
|
|
|
{{- else }}
|
|
|
|
{{- with site.Author.name }}
|
|
|
|
{{- $authorName = . }}
|
|
|
|
{{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- $pctx := . }}
|
2023-11-04 06:06:08 -04:00
|
|
|
{{- if .IsHome }}{{ $pctx = site }}{{ end }}
|
2023-11-04 05:53:31 -04:00
|
|
|
{{- $pages := slice }}
|
|
|
|
{{- if or $.IsHome $.IsSection }}
|
|
|
|
{{- $pages = $pctx.RegularPages }}
|
|
|
|
{{- else }}
|
|
|
|
{{- $pages = $pctx.Pages }}
|
|
|
|
{{- end }}
|
2023-11-04 06:06:08 -04:00
|
|
|
{{- $limit := site.Config.Services.RSS.Limit }}
|
2023-11-04 05:53:31 -04:00
|
|
|
{{- if ge $limit 1 }}
|
|
|
|
{{- $pages = $pages | first $limit }}
|
|
|
|
{{- end }}
|
2021-03-25 05:20:53 -04:00
|
|
|
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
2023-11-04 05:53:31 -04:00
|
|
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
2021-03-25 05:20:53 -04:00
|
|
|
<channel>
|
2023-11-04 06:06:08 -04:00
|
|
|
<title>{{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ site.Title }}{{ end }}</title>
|
2021-03-25 05:20:53 -04:00
|
|
|
<link>{{ .Permalink }}</link>
|
2023-11-04 06:06:08 -04:00
|
|
|
<description>Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ site.Title }}</description>
|
2022-03-27 09:14:06 -04:00
|
|
|
{{- with site.Params.images }}
|
2021-03-25 05:20:53 -04:00
|
|
|
<image>
|
2023-02-04 07:04:21 -05:00
|
|
|
<title>{{ site.Title }}</title>
|
2021-03-25 05:20:53 -04:00
|
|
|
<url>{{ index . 0 | absURL }}</url>
|
|
|
|
<link>{{ index . 0 | absURL }}</link>
|
|
|
|
</image>
|
|
|
|
{{- end }}
|
2023-11-04 05:49:28 -04:00
|
|
|
<generator>Hugo -- gohugo.io</generator>
|
2023-11-04 05:53:31 -04:00
|
|
|
<language>{{ site.Language.LanguageCode }}</language>{{ with $authorEmail }}
|
|
|
|
<managingEditor>{{.}}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with $authorEmail }}
|
2023-11-04 06:06:08 -04:00
|
|
|
<webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with site.Copyright }}
|
2023-11-04 05:53:31 -04:00
|
|
|
<copyright>{{ . }}</copyright>{{ end }}{{ if not .Date.IsZero }}
|
2021-03-25 05:20:53 -04:00
|
|
|
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
2023-11-04 05:53:31 -04:00
|
|
|
{{- with .OutputFormats.Get "RSS" }}
|
2021-03-25 05:20:53 -04:00
|
|
|
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
2023-11-04 05:53:31 -04:00
|
|
|
{{- end }}
|
|
|
|
{{- range $pages }}
|
2021-03-25 05:20:53 -04:00
|
|
|
{{- if and (ne .Layout `search`) (ne .Layout `archives`) }}
|
|
|
|
<item>
|
|
|
|
<title>{{ .Title }}</title>
|
|
|
|
<link>{{ .Permalink }}</link>
|
|
|
|
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
2023-11-04 05:53:31 -04:00
|
|
|
{{- with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }}
|
2021-03-25 05:20:53 -04:00
|
|
|
<guid>{{ .Permalink }}</guid>
|
|
|
|
<description>{{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}}</description>
|
2022-03-27 09:14:06 -04:00
|
|
|
{{- if site.Params.ShowFullTextinRSS }}
|
2021-05-02 01:59:31 -04:00
|
|
|
<content:encoded>{{ (printf "<![CDATA[%s]]>" .Content) | safeHTML }}</content:encoded>
|
2021-04-29 10:07:50 -04:00
|
|
|
{{- end }}
|
2021-03-25 05:20:53 -04:00
|
|
|
</item>
|
|
|
|
{{- end }}
|
2023-11-04 06:06:08 -04:00
|
|
|
{{- end }}
|
2021-03-25 05:20:53 -04:00
|
|
|
</channel>
|
|
|
|
</rss>
|