As mentioned earlier, I now have thematically separated Atom XML files for the blog. Jekyll does not provide this by default, and to my knowledge the existing feed-generation plugin also does not allow separation by author.
I made it very easy for myself to provide multiple feeds here. To do this, I copied and adapted the feed.xml. In my case, the file is located in the root directory of my Jekyll site.
In my feed.xml I found the following lines.
<atom:link href="{{ "/feed.xml" | absolute_url }}" rel="self" type="application/rss+xml"/>
(...)
<generator>Jekyll v{{ jekyll.version }}</generator>
{% for post in site.posts limit:10 %}
I copied feed.xml to cycling.xml and made two changes.
<atom:link href="{{ "/cycling.xml" | absolute_url }}" rel="self" type="application/rss+xml"/>
(...)
<generator>Jekyll v{{ jekyll.version }}</generator>
{% assign separatedposts = site.posts | where: "author", "joergcycling" | sort: "date" | reverse %}
{% for post in separatedposts limit:10 %}
On the next site build, a cycling.xml will then be available that contains only blog posts by the author joergcycling.
This only works if an author line is specified in the file’s front matter. There are, of course, more convenient approaches such as jekyll-feed, which allow different feeds to a certain extent, but this solution works without installing any additional plugins.
To adapt this for your own use, you would need to:
- adjust the file name (so that the link later appears correctly in the Atom feed’s metadata) and
- modify the
where: "author", "joergcycling"to suit your needs.