At some point in the past I had configured an atom feed for my blog. In config/_default/config.yml I have:
outputs:
home:
- HTML
- RSS
- Atom
outputFormats:
RSS:
mediatype: "application/rss+xml"
baseName: "rss"
Atom:
mediatype: "application/atom+xml"
baseName: "atom"
mediaTypes:
application/rss+xml:
suffixes:
- xml
application/atom+xml:
suffixes:
- xml
This results in files rss.xml and atom.xml. The RSS feed seems fine, but the atom feed no longer includes any posts. In layouts/_default/list.atom.xml I have:
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ .Site.Title }}</title>
{{ with .OutputFormats.Get "Atom" }}
<link rel="self" href="{{ .Permalink }}"/>
{{ end }}
<link href="{{ .Permalink }}" rel="alternate"></link>
<updated>{{ .Date.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
<id>{{ .Permalink }}</id>
{{ range first 15 .Data.Pages }}
<entry>
<title>{{ .Title }}</title>
<author>
<name>{{ .Params.author | default .Site.Author.name }}</name>
</author>
<link rel="alternate" href="{{ .Permalink }}"/>
<id>{{ .Permalink }}</id>
<published>{{ .Date.Format "2006-01-02T15:04:05Z" | safeHTML }}</published>
<updated>{{ .Lastmod.Format "2006-01-02T15:04:05Z" | safeHTML }}</updated>
<summary type="html">{{ .Summary | html }}</summary>
</entry>
{{ end }}
</feed>
I’m confident that at some point this worked, but now the the {{ range first 15 .Data.Pages }} expression only produces entries for “Abouts” and “Archives”. What’s going on here?