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.

129 lines
6.8 KiB

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