It’s a pretty quick and dirty port of my feed.xml template, but it seems to work. You can get the above code snippet directly on Github as well, but the syntax highlighter doesn’t like the YAML front matter and Liquid template tags too much, so it looks a bit ugly.

Update (2017-05-19): I’ve updated the code snippet a bit with more Jekyll tags for a more dynamic solution (like site.url and so on). Liquid template offers a great filter called jsonify that I’m using wherever applicable.