misplaced, punctuation

Valid XML Atom Feed on GitHub Pages


Attempting to brand my site, I wanted to use to prepend the title of non-linklog items. This wound up breaking the atom feed in Google Reader, and hence my favorite Google Reader client Reeder. I couldn’t have that.

The strange thing was that Firefox displayed everything correctly, but Google Reader and hence Reeder simply showed ⓩ in place of the correct unicode symbol. As it turns out, the feed is encoded as utf-8, however GitHub Pages was serving the file as US-ASCII, causing the issue.

Thanks to Taylor Fausak’s post on serving atom feeds at GitHub, I was able to come up with a solution. Simply using the extension .atom will make GitHub serve the correct headers. Rather than use the redundant atom.atom, I elected to shoot for feed.atom. To do this in Octopress was fairly straightforward.

  1. In _config.yml, I changed subscribe_rss: /atom.xml to subscribe_rss: /feed.atom. I thought this would be enough. I was wrong.

  2. In the Rakefile, plugins/category_generator.rb, and sitemap_generator.rb, search and replace atom.xml with feed.atom. (Strange these guys are hard coded).

  3. In the source directory, rename atom.xml to feed.atom.

Now I have a W3C certified valid feed and everything works splendidly. That is, until I break something new.