podcast.netzbegruenung.de/layouts/podcast/rss.xml
Marian Steinbach eda64f71d8 Initial version
2020-01-18 00:32:07 +01:00

64 lines
3.5 KiB
XML

<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
<channel>
<title>{{ .Site.Params.Podcast.Title | default .Site.Title }}</title>
<link>{{ .Permalink }}</link>
<description>{{ .Site.Params.Podcast.Description | default .Site.Params.Description }}</description>
<language>{{ .Site.Params.Podcast.Lang | default .Site.LanguageCode }}</language>
{{ with .Site.Author.email -}}
<managingEditor>{{ . }}{{ with $.Site.Author.name }} ({{ . }}){{end}}</managingEditor>
{{ 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" -}}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end -}}
{{ with .Site.Params.Podcast.Image }}{{ $image := resources.Get . }}<itunes:image href="{{ $image.Permalink }}" />{{ end }}
{{ with .Site.Params.Podcast.Category -}}
<itunes:category {{ if .name }}text="{{ .name }}"{{end}}>
{{ range .subcategories }}<itunes:category text="{{ . }}" />{{ end }}
</itunes:category>
{{ end -}}
{{ with .Site.Params.Podcast.Owner -}}
<itunes:owner>
{{ with .name }}<itunes:name>{{ . }}</itunes:name>{{ end }}
{{ with .email }}<itunes:email>{{ . }}</itunes:email>{{ end }}
</itunes:owner>
{{ end -}}
{{ with .Site.Params.Podcast.Description }}<itunes:summary>{{ . }}</itunes:summary>{{ end }}
{{ with .Site.Params.Podcast.Author }}<itunes:author>{{ . }}</itunes:author>{{ end }}
{{ with .Site.Params.Podcast.Type }}<itunes:type>{{ . }}</itunes:type>{{ end }}
{{ with .Site.Params.Podcast.Block }}<itunes:block>{{ . }}</itunes:block>{{ end }}
{{ with .Site.Params.Podcast.Complete }}<itunes:complete>{{ . }}</itunes:complete>{{ end }}
{{ with .Site.Params.Podcast.NewFeed }}<itunes:new-feed-url>{{ . }}</itunes:new-feed-url>{{ end }}
<itunes:explicit>{{ if .Site.Params.Podcast.Explicit }}true{{ else }}false{{ end }}</itunes:explicit>
{{ range .Pages }}
<item>
<title>{{ .Title }}</title>
<itunes:title>{{ .Title }}</itunes:title>
<link>{{ .Permalink }}</link>
<guid>{{ .Permalink }}</guid>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email -}}
<author>{{ . }}{{ with $.Site.Author.name }} ({{ . }}){{ end }}</author>
{{ end -}}
<description>{{ .Content | html }}</description>
{{ with .Params.podcast }}<enclosure url="{{ .mp3 }}" length="{{ .mp3Size }}" type="audio/mpeg" />{{ end }}
{{ with .Params.podcast.duration }}<itunes:duration>{{ . }}</itunes:duration>{{ end }}
{{ with .Params.podcast.image.src }}{{ $image := resources.Get . }}<itunes:image href="{{ $image.Permalink }}" />{{ end }}
{{ with .Params.podcast.episode }}<itunes:episode>{{ . }}</itunes:episode>{{ end }}
{{ with .Params.podcast.episodeType }}<itunes:episodeType>{{ . }}</itunes:episodeType>{{ end }}
{{- with .Params.podcast.season }}<itunes:season>{{ . }}</itunes:season>{{ end -}}
{{- with .Params.podcast.block }}<itunes:block>{{ . }}</itunes:block>{{ end -}}
{{- with .Params.podcast.explicit }}<itunes:explicit>{{ . }}</itunes:explicit>{{ end -}}
</item>
{{ end }}
</channel>
</rss>