65 lines
4 KiB
XML
65 lines
4 KiB
XML
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
|
|
<rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:content="http://purl.org/rss/1.0/modules/content/">
|
|
<channel>
|
|
<title>{{ site.Params.Podcast.Title | default site.Title }}</title>
|
|
<link>{{ .Permalink }}</link>
|
|
<description>{{ site.Params.Podcast.Description | default site.Params.Description }}</description>
|
|
<generator>Hugo -- gohugo.io</generator>
|
|
<language>{{ site.Params.Podcast.Lang | default site.LanguageCode }}</language>
|
|
{{ with site.Params.author.email -}}
|
|
<managingEditor>{{ . }}{{ with site.Params.author.name }} ({{ . }}){{ end }}</managingEditor>
|
|
{{ end -}}
|
|
{{ with site.Params.author.email -}}
|
|
<webMaster>{{ . }}{{ with site.Params.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 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.Params.Podcast.Author }}<author>{{ . }}</author>{{ end }}
|
|
<description>{{ .Content | html }}</description>
|
|
{{ if site.Params.Podcast.local | default true -}}
|
|
{{ with .Params.podcast.mp3 }}{{ $file_stat := os.Stat (path.Join "/static" .) }}<enclosure url="{{ if site.Params.Podcast.cdn }}{{ path.Join site.Params.Podcast.cdn (. | relURL) }}{{ else }}{{ . | absURL }}{{ end }}" length="{{ $file_stat.Size }}" type="audio/mpeg" />{{ end }}
|
|
{{ else -}}
|
|
{{ with .Params.podcast.mp3 }}<enclosure url="{{ if site.Params.Podcast.cdn }}{{ add site.Params.Podcast.cdn (. | relURL) }}{{ else }}{{ . | absURL }}{{ end }}" type="audio/mpeg" />{{ end }}
|
|
{{ 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 }}
|
|
<itunes:explicit>{{ if .Params.podcast.explicit }}true{{ else }}false{{ end }}</itunes:explicit>
|
|
</item>
|
|
{{ end -}}
|
|
</channel>
|
|
</rss>
|