{{- $rssHeader := partial "single-book-rss-header.xml" . -}}
{{- htmlUnescape $rssHeader -}}

<title>{{ .Site.Params.ZSJSYDBTitle }}</title>
<description><![CDATA[{{ .Site.Params.ZSJSYDBSummary }}]]></description>
<copyright>{{ .Site.Params.podcastLicense }} 2012-{{ now.Format "2006"}} {{ .Site.Params.ZSJSYDBTitle }}</copyright>

<image>
<link>{{ .Site.Params.baseURL }}</link>
<url>{{ .Site.Params.logo }}</url>
<title>{{ .Site.Params.ZSJSYDBTitle }}</title>
</image>

<itunes:author>{{ .Site.Params.ZSJSYDBReader }}</itunes:author>
<itunes:image href="{{ .Site.Params.ZSJSYDBCover }}"/>
<itunes:subtitle>{{ .Site.Params.ZSJSYDBSubtitle }}</itunes:subtitle>
<itunes:summary><![CDATA[{{ .Site.Params.ZSJSYDBSummary }}]]></itunes:summary>

<itunes:owner>
<itunes:name>{{ .Site.Params.ZSJSYDBReader }}</itunes:name>
<itunes:email>{{ .Site.Params.email }}</itunes:email>
</itunes:owner>

{{- partial "single-book-rss-itunes.xml" . -}}

{{- range (.Site.RegularPages.ByParam "date").Reverse -}}
{{- if in .Params.books "zsjsydb" -}}
<item>
  <itunes:author>{{ .Site.Params.ZSJSYDBReader }}</itunes:author>
  <itunes:image href="{{- if and (ne .Params.image nil) (ne .Params.image "") -}}
    {{ .Site.Params.baseURL }}{{ .Params.image }}
    {{ else }}
    {{- .Site.Params.ZSJSYDBCover -}}
    {{- end -}}" />
    {{- partial "single-book-rss-content.xml" . -}}
  </item>
{{- end -}}
{{- end -}}

</channel>
</rss>
