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