summaryrefslogtreecommitdiff
path: root/example/podcast.xml
blob: 51dd567217ba1d5761739ac59cf8d7a7d87aa574 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">

<channel>
    <title>Example Podcast</title>
    <link>https://www.example.org/</link>
    <language>en</language>
    <copyright>&#xA9; 2024 Jesse Morgan</copyright>
    <lastBuildDate>{{ now() | date(format="%a, %e %b %Y %T %z") }}</lastBuildDate>
    <itunes:subtitle>An example podcast</itunes:subtitle>
    <itunes:author>John Doe</itunes:author>
    <itunes:keywords>example</itunes:keywords>
    <itunes:summary>This is only a test</itunes:summary>
    <description>This is only a test</description>
    <itunes:owner>
        <itunes:name>John Doe</itunes:name>
        <itunes:email>john@example.org</itunes:email>
    </itunes:owner>
    <itunes:image href="https://example.org/images/logo.png" />
    <itunes:category text="Religion &amp; Spirituality">
      <itunes:category text="Christianity" />
    </itunes:category>
    <itunes:type>episodic</itunes:type>

 {% for entry in entries | sort(attribute="date") | reverse | slice(end=10) %}
    <item>
        <title>{{ entry.title }}</title>
        {% if entry.album %}
        <itunes:subtitle>{{ entry.album }}: {{ entry.title }}</itunes:subtitle>
        {% endif %}
        <itunes:author>{{ entry.artist }}</itunes:author>
        <itunes:summary>
            {% if entry.album %}Part of the {{ entry.album }} series {% endif %}
            By {{ entry.artist }}
        </itunes:summary>
        <itunes:image href="https://example.org/logo.png" />
        <enclosure url="https://example.org/{{ entry.filename }}" length="{{ entry.size }}" type="audio/mpeg" />
        <guid>{{ entry.filename }}</guid>
        <pubDate>{{ entry.date | date(format="%a, %e %b %Y %T %z") }}</pubDate>
        <itunes:duration>{{ entry.duration }}</itunes:duration>
        <itunes:explicit>false</itunes:explicit>
        <link>https://example.org/{{ entry | make_filename(template="episodes.html") }}</link>
    </item>

 {% endfor %}

</channel>
</rss>