prune and tidy the rss feed xml for podcasts

This commit is contained in:
Greg Gauthier 2022-01-05 12:27:13 +00:00
parent 0a65c5e7d7
commit 8ac34fb878

View File

@ -21,20 +21,27 @@
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} by {{ end }}{{ .Site.Title }}{{ end }}</title> <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} by {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
</image> </image>
<!-- *** ITUNES TAGS *** -->
<itunes:category text="Society &amp; Culture"> <itunes:category text="Society &amp; Culture">
<itunes:category text="Philosophy"/> <itunes:category text="Philosophy"/>
</itunes:category> </itunes:category>
<itunes:explicit>No</itunes:explicit> <itunes:explicit>No</itunes:explicit>
<itunes:type>episodic</itunes:type>
<itunes:summary>Philosophy essays, debates, discussions, and other explorations.</itunes:summary>
<itunes:image href="{{ .Site.BaseURL }}img/avatar.png"/>
<itunes:owner> <itunes:owner>
<itunes:name>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} by {{ end }}{{ .Site.Title }}{{ end }}</itunes:name> <itunes:name>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} by {{ end }}{{ .Site.Title }}{{ end }}</itunes:name>
<itunes:email>{{ .Site.Params.email }}</itunes:email> <itunes:email>{{ .Site.Params.email }}</itunes:email>
</itunes:owner> </itunes:owner>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} <!-- /// END ITUNES TAGS /// -->
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} <generator>Hugo -- gohugo.io</generator>
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} {{ with .Site.LanguageCode }}<language>{{.}}</language>{{end}}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} {{ with .Site.Author.email }}<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} {{ with .Site.Author.email }}<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}
{{ with .Site.Copyright }}<copyright>{{.}}</copyright>{{end}}
{{ if not .Date.IsZero }}<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- with .OutputFormats.Get "RSS" -}} {{- with .OutputFormats.Get "RSS" -}}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end -}} {{- end -}}
@ -53,14 +60,12 @@
<enclosure url="{{ $.Site.Params.podcastCdnURL }}{{ . }}" type="audio/mpeg"/> <enclosure url="{{ $.Site.Params.podcastCdnURL }}{{ . }}" type="audio/mpeg"/>
{{ end }} {{ end }}
{{ end }} {{ end }}
<description> <description>
{{`<![CDATA[ ` | safeHTML }} {{`<![CDATA[ ` | safeHTML }}
{{ if isset .Params "image" }}<p><img src="{{ .Site.Params.podcastCdnURL }}{{ with .Params.image }}{{.}}{{ end }}" width="600" height="338" /></p>{{end}} {{ if isset .Params "image" }}<p><img src="{{ .Site.Params.podcastCdnURL }}{{ with .Params.image }}{{.}}{{ end }}" width="600" height="338" /></p>{{end}}
{{ .Summary | safeHTML }} {{ .Summary | safeHTML }}
]]> ]]>
</description> </description>
<content:encoded> <content:encoded>
{{`<![CDATA[ ` | safeHTML }} {{`<![CDATA[ ` | safeHTML }}
{{ if isset .Params "image" }} {{ if isset .Params "image" }}