<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
    xmlns:podcast="https://podcastindex.org/namespace/1.0"
    xmlns:atom="http://www.w3.org/2005/Atom"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>{{title}}</title>
        <link>{{link}}</link>
        <description>{{description}}</description>
        {{~#if language}}<language>{{language}}</language>{{/if}}
        {{~#if category}}<itunes:category text="{{category}}">{{sub_category}}</itunes:category>{{/if}}
        <itunes:explicit>{{#if explicit}}true{{else}}false{{/if}}</itunes:explicit>
        {{~#if image_url}}<itunes:image href="{{image_url}}" />{{/if}}
        {{~#if author}}<itunes:author>{{author}}</itunes:author>{{/if}}
        {{~#if copyright}}<copyright>{{copyright}}</copyright>{{/if}}
        {{~#if funding_url}}<podcast:funding url="{{funding_url}}">{{funding_text}}</podcast:funding>{{/if}}
        {{~#if type}}<itunes:type>{{type}}</itunes:type>{{/if}}
        {{~#if complete}}<itunes:complete>yes</itunes:complete>{{/if}}
        {{~#if locked}}<podcast:locked>yes</podcast:locked>{{/if}}
        {{~#if guid}}<podcast:guid>{{guid}}</podcast:guid>{{/if}}
        {{~#if self_link}}<atom:link href="{{self_link}}" rel="self" type="application/rss+xml" />{{/if}}
        {{#each_row}}
        <item>
            <title>{{title}}</title>
            <link>{{link}}</link>
            <description>{{description}}</description>
            {{~#if date}}<pubDate>{{rfc2822_date date}}</pubDate>{{/if}}
            {{~#if enclosure_url}}<enclosure length="{{enclosure_length}}" type="{{enclosure_type}}" url="{{enclosure_url}}" />{{/if}}
            {{~#if guid}}<guid isPermaLink="false">{{guid}}</guid>{{/if}}
            {{~#if episode}}<itunes:episode>{{episode}}</itunes:episode>{{/if}}
            {{~#if season}}<itunes:season>{{season}}</itunes:season>{{/if}}
            {{~#if episode_type}}<itunes:episodeType>{{episode_type}}</itunes:episodeType>{{/if}}
            {{~#if block}}<itunes:block>yes</itunes:block>{{/if}}
            {{~#if (not (eq explicit NULL))}}<itunes:explicit>{{#if explicit}}true{{else}}false{{/if}}</itunes:explicit>{{/if}}
            {{~#if image_url}}<itunes:image href="{{image_url}}" />{{/if}}
            {{~#if duration}}<itunes:duration>{{duration}}</itunes:duration>{{/if}}
            {{~#if transcript_url}}<podcast:transcript url="{{transcript_url}}" type="{{transcript_type}}" />{{/if}}
        </item>
        {{/each_row}}
    </channel>
</rss>
