Shiny New Look 

I’d been meaning to play around with Jekyll for a while. When I started this site in 2004, I built it on Blogger. Sometime in 2007, I think, I moved it to Wordpress. This site has existed on Wordpress in some way for the last decade.

Wordpress has been a great tool, and has evolved considerably, but it’s always been something that I’ve needed to pay attention to from a security and performance perspective. I’ve also taken to writing more markdown, which works with Wordpress, but not as easily as with some of the various static site generators (like Jekyll).

It took a couple of days to get everything ported over. I started with the Wordpress.com importer, used that to bootstrap the site, and then spent a bunch of time figuring out how to get started.

First up was a theme. I screwed up a couple of times here—this is something Jekyll does that’s a bit more complicated than I would have expected. Basically, unless your theme is in a Ruby gem, you basically drop it over your existing settings. It took me a bit to get everything figured out, but I used the Hyde theme as the base for my setup and did a bit of tweaking to get the look right.

From there, I started to play with a few different things. By default, Jekyll doesn’t have the ability to group pages/posts in an archive, but it does have a nice plugin to take care of it. With a little configuration, I had setup an Archives page that has my categories and monthly archives.

I’ve been trying to get footnotes to work nicer than they had previously. Again, there’s a nice plugin for that that will work on all my posts moving forward. 1 Once I got all this working, I started playing with how to do deploys. I’m using git, running on my server, to do deploys. It’s using an adapted version of the method found here. I push my site live, and it builds it automatically.

That whole thing works awesomely, except that my builds were taking almost a minute, which is far too long. I used the jekyll profiler to find out it was spending a lot of time in the sidebar. Basically, it was looping through every single post to figure out that I have a couple of them that are defined as pages.

Replacing this code:

{% assign pages_list = site.pages %}
  {% for node in pages_list %}
    {% if node.title != null %}
      {% if node.layout == "page" %}
        <a class="sidebar-nav-item{% if page.url == node.url %} active{% endif %}" href="{{ node.url }}">{{ node.title }}</a>
      {% endif %}
    {% endif %}
  {% endfor %}

with this:

<nav class="sidebar-nav">
  <a class="sidebar-nav-item{% if page.title == 'Home' %} active{% endif %}" href="/">Home</a>
  <a class="sidebar-nav-item{% if page.title == 'About' %} active{% endif %}" href="/about/">About</a>
  <a class="sidebar-nav-item{% if page.title == 'Archive' %} active{% endif %}" href="/archive/">Archive</a>
</nav>

sped up my deploys by 75% (from 60 seconds down to 15).

I also made link posts (like this one) a little easier to discern. It uses this character—⚐—to highlight that it’s a link post and give you a way to access the permalink (the little flag).

The site is a lot faster, has no active dependencies, and could be picked up and redployed almost anywhere with little effort.

I haven’t ported over my comments yet (that’s next). I’m not sure what I’m going to do, whether bring them over as static content and not offer comments moving forward, or import them into some system, but that’ll be a project for another day.

If you notice anything out of sorts, broken, or otherwise gummed up, let me know.

  1. See how nice this is? Also, at some point I’ll try to fix up the old footnotes. But this is good for now.