---
pagination:
    data: collections.tags
    size: 1
    alias: tag
eleventyComputed:
    permalink: "/post/tag/{{ tag }}/rss.xml"
eleventyExcludeFromCollections: true
eleventyImport:
  collections: ["posts", "tags"]
---
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="/rss.xslt" type="text/xsl"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:base="{{ metadata.site.url }}" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>{{ metadata.site.name }}</title>
    <link>{{ metadata.site.url }}</link>
    <atom:link href="{{ permalink | absoluteUrl(metadata.site.url) }}" rel="self" type="application/rss+xml" />
    <description>Posts tagged #{{ tag }}</description>
    <language>{{ metadata.site.language }}</language>
    {%- for post in collections.tagPosts[tag] %}
    {%- set absolutePostUrl = post.url | absoluteUrl(metadata.site.url) %}
    <item>
      <title>{{ post.data.title }}</title>
      <link>{{ absolutePostUrl }}</link>
      <description>{{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }}</description>
      <pubDate>{{ post.date | dateToRfc822 }}</pubDate>
      <dc:creator>{{ metadata.author.name }}</dc:creator>
      <atom:summary>{{ post | excerpt }}</atom:summary>
      <guid>{{ absolutePostUrl }}</guid>
    </item>
    {%- endfor %}
  </channel>
</rss>