---
eleventyExcludeFromCollections: true
eleventyImport:
  collections:
    - weeklyDigests
permalink: /digest/feed.xml
---
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>{{ site.name }} — Weekly Digest</title>
    <link>{{ site.url }}/digest/</link>
    <description>Weekly summary of all posts on {{ site.name }}. One update per week.</description>
    <language>{{ site.locale | default('en') }}</language>
    <atom:link href="{{ site.url }}/digest/feed.xml" rel="self" type="application/rss+xml"/>
    <atom:link href="https://websubhub.com/hub" rel="hub"/>
    {%- set latestDigests = collections.weeklyDigests | head(20) %}
    {%- if latestDigests.length %}
    <lastBuildDate>{{ latestDigests[0].endDate | dateToRfc822 }}</lastBuildDate>
    {%- endif %}
    {%- for digest in latestDigests %}
    <item>
      <title>{{ digest.label }} ({{ digest.startDate | dateDisplay }} – {{ digest.endDate | dateDisplay }})</title>
      <link>{{ site.url }}/digest/{{ digest.slug }}/</link>
      <guid isPermaLink="true">{{ site.url }}/digest/{{ digest.slug }}/</guid>
      <pubDate>{{ digest.endDate | dateToRfc822 }}</pubDate>
      <description>{{ digest | digestToHtml(site.url) | escape }}</description>
    </item>
    {%- endfor %}
  </channel>
</rss>
