<?xml version="1.0" encoding="UTF-8" ?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
        <atom:link
                href="https://{{ canonical }}/rss"
                rel="self"
                type="application/rss+xml"
        />
        <title>{{ canonical }}</title>
        <link>https://{{ canonical }}</link>
        <description>This is your RSS feed.</description>
        <generator>{{ generator }}</generator>
        <copyright>2026 {{ globals.author }} - all rights reserved</copyright>
        {% match content.posts.last() -%}
        {% when Some(post) -%}
        <lastBuildDate>{{ post.date | timestamp_s_to_rfc_2822 }}</lastBuildDate>
        <pubDate>{{ post.date | timestamp_s_to_rfc_2822 }}</pubDate>
        {% when None -%}
        {% endmatch -%}
        {% let posts = content.posts -%}
        {% for post in sort!(posts, date) | reverse -%}
        <item>
            <title>{{ post.title }}</title>
            <link>https://{{ canonical }}/posts/{{ post.slug }}</link>
            <guid isPermaLink="false">
                https://{{ canonical }}/posts/{{ post.slug }}
            </guid>
            <pubDate>{{ post.date | timestamp_s_to_rfc_2822 }}</pubDate>
        </item>
        {% endfor -%}
    </channel>
</rss>
