You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

127 lines
6.8 KiB

  1. {{ "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" | htmlUnescape | safeHTML }}
  2. <rss version="2.0"
  3. xmlns:podcast="https://podcastindex.org/namespace/1.0"
  4. xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
  5. xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"
  6. xmlns:atom="http://www.w3.org/2005/Atom"
  7. xmlns:sy="https://purl.org/rss/1.0/modules/syndication/"
  8. xmlns:content="https://purl.org/rss/1.0/modules/content/"
  9. xmlns:dc="https://purl.org/dc/elements/1.1/"
  10. >
  11. <channel>
  12. <title>{{ $.Site.Title }}</title>
  13. <atom:link href="{{ "interview/index.xml" | absURL }}" rel="self" type="application/rss+xml" />
  14. <link>{{ .Site.BaseURL }}</link>
  15. <description>{{ .Site.Params.feed.itunes_summary | truncate 4000 ""}}</description>
  16. <lastBuildDate>{{ dateFormat "Mon, 2 Jan 2006 15:04:05 -0700" .Date }}</lastBuildDate>
  17. <sy:updatePeriod>hourly</sy:updatePeriod>
  18. <sy:updateFrequency>1</sy:updateFrequency>
  19. <language>{{ .Site.Params.feed.language | default .Site.LanguageCode }}</language>
  20. <copyright>{{ .Site.Params.feed.copyright }}</copyright>
  21. {{ with .Site.Params.feed.itunes_subtitle }}<itunes:subtitle>{{ . }}</itunes:subtitle>{{ end }}
  22. <itunes:author>{{ .Site.Params.feed.itunes_author }}</itunes:author>
  23. <itunes:type>episodic</itunes:type>
  24. <googleplay:author>{{ .Site.Params.feed.itunes_author }}</googleplay:author>
  25. <googleplay:email>{{ .Site.Params.feed.itunes_owner_email }}</googleplay:email>
  26. <itunes:summary>{{ .Site.Params.feed.itunes_summary | truncate 4000 ""}}</itunes:summary>
  27. <googleplay:description>{{ .Site.Params.feed.itunes_summary | truncate 4000 ""}}</googleplay:description>
  28. <itunes:owner>
  29. <itunes:name>{{ .Site.Params.feed.itunes_owner_name }}</itunes:name>
  30. <itunes:email>{{ .Site.Params.feed.itunes_owner_email }}</itunes:email>
  31. </itunes:owner>
  32. <itunes:image href="{{ .Site.Params.feed.itunes_image }}" />
  33. <googleplay:image href="{{ .Site.Params.feed.itunes_image }}"></googleplay:image>
  34. <image>
  35. <url>{{ .Site.Params.feed.itunes_image }}</url>
  36. <title>{{ $.Site.Title }}</title>
  37. <link>{{ .Site.BaseURL }}</link>
  38. </image>
  39. <itunes:category text="{{ .Site.Params.feed.itunes_top_category }}">
  40. {{ with .Site.Params.feed.itunes_first_sub_category -}}
  41. <itunes:category text="{{ . }}" />
  42. {{- end -}}
  43. {{- with .Site.Params.feed.itunes_second_sub_category -}}
  44. <itunes:category text="{{ . }}" />
  45. {{- end -}}
  46. </itunes:category>
  47. {{- if isset .Site.Params.feed "explicit" -}}
  48. <itunes:explicit>{{ .Site.Params.feed.explicit }}</itunes:explicit>
  49. <googleplay:explicit>{{ .Site.Params.feed.explicit }}</googleplay:explicit>
  50. {{- end -}}
  51. <generator>Hugo -- gohugo.io</generator>
  52. {{- range (where ( where .Site.Pages "Type" "interview") ".Params.upcoming" "!=" true) -}}
  53. {{ if isset .Params "podcast_file" }}
  54. <item>
  55. {{ if and (isset .Site.Params "episode_number_style") (.Params.episode) }}
  56. {{ if eq .Site.Params.episode_number_style "parens" }}
  57. <title>{{ title .Title }} ({{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }})</title>
  58. {{ else if eq .Site.Params.episode_number_style "brackets" }}
  59. <title>{{ title .Title }} [{{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }}]</title>
  60. {{ else if eq .Site.Params.episode_number_style "dash" }}
  61. <title>{{ title .Title }} - {{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }}</title>
  62. {{ else }}
  63. <title>{{ title .Title }}</title>
  64. {{ end }}
  65. {{ else }}
  66. <title>{{ title .Title }}</title>
  67. {{ end }}
  68. <link>{{ .Permalink }}</link>
  69. <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} </pubDate>
  70. <dc:creator>{{ .Site.Params.itunes_author }}</dc:creator>
  71. <guid>{{- if isset .Params "guid" -}}{{ .Params.guid }}{{- else -}}{{ .Site.Params.media_prefix }}{{ .Params.podcast_file }}{{- end -}}</guid>
  72. <itunes:author>
  73. {{- if isset .Params "hosts" -}}
  74. {{ $hosts := (.Params.hosts) }}
  75. {{ $len := (len $hosts) }}
  76. {{ range $index, $element := $hosts }}
  77. {{ range where (where $.Site.Pages "Type" "contributor" ) ".File.BaseFileName" "=" . }}
  78. {{- if eq $len 1 -}}
  79. {{ .Title }}
  80. {{- else -}}
  81. {{- if eq (add $index 1) $len }}
  82. and {{ .Title }}
  83. {{- else -}}
  84. {{- if eq $len 2 -}}
  85. {{ printf "%s " .Title }}
  86. {{- else -}}
  87. {{ printf "%s, " .Title }}
  88. {{- end -}}
  89. {{- end -}}
  90. {{- end -}}
  91. {{ end }}
  92. {{- end -}}
  93. {{- else -}}
  94. {{ .Site.Params.feed.itunes_author }}
  95. {{- end -}}
  96. </itunes:author>
  97. {{ with .Params.episode }}
  98. <itunes:episode>{{ . }}</itunes:episode>
  99. {{ end }}
  100. <itunes:title>{{ title .Title }}</itunes:title>
  101. {{"<itunes:subtitle><![CDATA[" | safeHTML }}
  102. {{ with .Params.subtitle }}
  103. {{ . | plainify | truncate 243 "..." }}
  104. {{ else }}
  105. {{ .Description | plainify | truncate 243 "..." }}
  106. {{ end }}
  107. {{"]]></itunes:subtitle>" | safeHTML}}
  108. <itunes:summary>{{ htmlEscape (.Description | plainify) }}</itunes:summary>
  109. <description>{{ .Description | plainify }}</description>
  110. <googleplay:description>{{ .Description | plainify }}</googleplay:description>
  111. {{ "<content:encoded><![CDATA[" | safeHTML }}{{ .Content | safeHTML }}{{"]]></content:encoded>" | safeHTML}}
  112. {{- with .Params.episode_image -}}
  113. <itunes:image href="{{ . | absURL }}"></itunes:image>
  114. <googleplay:image href="{{ . | absURL }}"></googleplay:image>
  115. {{- end -}}
  116. <enclosure url="{{ .Site.Params.media_prefix }}{{ .Params.podcast_file }}" {{with .Params.podcast_bytes}}length="{{ . }}"{{ end }} type="audio/mpeg" />
  117. {{- with .Params.podcast_duration -}}<itunes:duration>{{ . }}</itunes:duration>{{- end -}}
  118. {{- with .Params.explicit -}}
  119. <itunes:explicit>{{ if (or (eq . "yes") (eq . "true")) }}true{{ else }}false{{ end }}</itunes:explicit>
  120. <googleplay:explicit>{{ if (or (eq . "yes") (eq . "true")) }}yes{{ else }}no{{ end }}</googleplay:explicit>
  121. {{- end -}}
  122. </item>
  123. {{- end -}}
  124. {{- end -}}
  125. </channel>
  126. </rss>