A website by Patrick White

The Joy of Jekyll

(I really like that title but am, sadly, not the first to use it. Maybe I’ll do a “The Joy of Jekyll” ebook.)

Anyway, I recently started using Jekyll and really love it. It’s how I created this site as well as a few others that I created in a flurry of activity when I started using Jekyll (two days) ago.

(For the uninitiated, what is Jekyll? Well, it’s a static site generator. What the hell is that? The short answer is that if you’d care, you’d already know i.e. it’s something that developers care about and to them/us the term is pretty self-explanatory.

But, for the curious, a static site generator is a computer program that spits out HTML and CSS files that constitute a website. How is that different from any other website? Aren’t all websites HTML and CSS?

Well, these days, most websites are “dynamic” in that a computer program spits out HTML and CSS shortly after you request the page i.e. on the fly often based on the specifics of what you want. So when you google “pretty purple polka dot octopus”, Google looks through their servers and sees what they have for that and generates HTML and CSS just for you (kinda, if someone else searches for the same thing right after you, they’ll probably reuse the result; that’s called caching).

Whereas with a static site (the thing generated by a static site generator), the HTML and CSS doesn’t change except when you change it. Every time someone loads a particular page, they get the exact same page. This obviously limits what you can do on the website (it’d be hard to create a search engine as a static site, for example), but it works for fine blogs like that aren’t really interactive as such.)

Anyway, why so many Jekyll sites? Because Jekyll fits a real sweet spot for me in that it allows me to very quickly create a site, make it look halfway decent (using the many openly licensed themes available), and host it very cheaply.

Why not Wordpress? Doesn’t it meet those criteria? Well, yeah, there are lots of good free Wordpress themes available some of which are free. That’s true. But hosting is another issue.

To do it right, it seems like you should use WPEngine. That starts at what $20 or $30 a month? Not bad but not nothing and, given the way I tend to start lots of things and only complete a fraction of them, it’d be nice to be able to start a blog and keep it around indefinitely without the small, but constant, sting of even $20 a month.

Whereas, since Jekyll just creates a static site, hosting can be done super, SUPER cheaply. My preferred set up is S3 and Cloudfront, which is what I’m using here. It probably costs two cents to host this blog for a month. (More if I got more traffic, but I could get a million visits and probably only spend $100, if that.)

So, yes, Jekyll is wonderful.