this website

the how and the why

I’ll press your flesh, you dimwitted sumbitch! You don’t tell your pappy how to court the electorate. We ain’t one-at-a-timin’ here. We’re MASS communicating! (Pappy O’Daniel in O Brother, Where Art Thou?)


  1. I’m not happy with the way the old one looked,
  2. I wanted to learn Ruby (a mixture of curiosity and having to use it somewhere else).
  3. I felt inspired to play with this stuff reading this blog post: (even though I didn’t end up hosting it on AWS at the end).


This site is built using Jekyll, which essentially is a template processing tool written in Ruby. A good place to start are the various links shown on the about page page. Lots of people use it, and lots of people have written tutorials. Here are a few bits which I took a bit further from there.


It’s easy to set up a Jekyll blog (and free on Github if you don’t need plugins), and here are a few tutorials that helped me a lot:

See this post and gist.

Atom Feed and Sitemap

The traditional way to do this appears to be creating an XML file with Liquid templates

layout: nil
<?xml version="1.0"?>
<feed xmlns="">
	<title>Your Website</title>
	<link href=""/>
	<link type="application/atom+xml" rel="self" href=""/>
	<updated>{{ site.time | date_to_xmlschema }}</updated>
		<name>Your Name</name>

	{% for post in site.posts %}
		<id>{{ }}</id>
		<link type="text/html" rel="alternate" href="{{ post.url }}"/>
		<title>{{ post.title }}</title>
		<published>{{ | date_to_xmlschema }}</published>
		<updated>{{ | date_to_xmlschema }}</updated>
			<name>Your Name</name>
		<content type="html">{{ post.content | xml_escape }}</content>
	{% endfor %}

This works, but it’d be nice to have more control over how the summary and content of posts are exported to the RSS feed. Also, the layout of <pre> tags will not be preserved, which doesn’t look so good. Finally, when using the above feed for static site search, our site’s users will have to use queries for HTML rather than plain text. My solution post-processes the output of Jekyll into an Atom feed using a plugin. The plugin works pretty much like a standard generator, but is run in Site::write in order to have access to Page/Post::output.

module Jekyll

  class Site
    # We overload site's write function because a Generator won't do
    # here, we need the rendered pages as an input.
    alias :old_write :write

    def write
      # ...
      # Make Atom Feed

      # finally, write everything

I will publish the full sources for this soon.