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.

interview.rss.xml 6.5 KiB

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