Drew's Blog - Home - Archive

Adding RSS to Jekyll

As many of you know, I use Jekyll to generate HTML for this blog. There are some good Jekyll templates out there (like Octopress), but since I don't want to just another blog with a standard template, I rolled my own everything. This means that there a few (somewhat critical) things that I haven't gotten around to yet, like adding RSS (which I have now done, just in time for the death of Google Reader).

Anyway, to add this on Jekyll, you first need to create an XML file that will list your posts (or at least the most recent 10). I recommend using snaptortise's jekyll-rss-feeds templates for these. I only have the main feed.xml one, since I don't do enough categorizing. Put that template in whatever file you want, but you'll probably want to do something like /feed.xml, or /feed/index.xml.

Next, you need to add config variables to your _config.yml file. Here's what I added: name: Drew's Blog
description: Drew occasionally writes about things.
url: http://blog.drewinglis.com

Finally, you should add a meta tag with type="application/rss+xml", so you can be discovered by RSS readers. Here's what mine looks like: <link rel="alternate" type="application/rss+xml" title="{{ site.name }}" href="{{ site.url }}/feed.xml">

Now you're done! Huzzah!

(Hopefully I will start posting more soon; I'm trying to do more recreational coding, so I should have more material to work with.)

If you've read this far, you should probably follow me on Twitter.

See more posts

Drew writes code for fun and (sometimes) profit. He's currently studying Computer Science at Carnegie Mellon University. He has previously worked at Facebook, Amazon, and a startup called Intersect.