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.

128 lines
6.8 KiB

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