On walkabout in life and technology

Upgrading Octopress to Jekyll 2.0

So this happened today:

I’ve been waiting for this. Now that it has, I decided to finally upgrade this site.

It was easy. As per Updating Octopress, I just ran:

git pull octopress master

Then, to ensure all gems were up to date, I ran

bundle update

Finally, I got ready - update source, clean caches and generate the blog. Note that I chose not to update the style as I like my SASS changes.

rake update_source
rake clean
rake generate

And it failed.

One thing went wrong and it was because of a old change in Jekyll. You see, before the upgrade I was using the positively ancient Jekyll 0.12. Since 1.11, Jekyll has added excerpts, where it takes the first markdown paragraph in a post and generates that as the excerpt, which it then runs through Liquid. However, I often start a post with the blockquote tag and many of these quotes have multiple paragraphs. The result:

Hiltmon@Dauntless:HiltmonDotCom (master *) $ rake generate
## Generating Site with Jekyll
identical source/stylesheets/screen.css
Configuration file: /Users/Hiltmon/Projects/Spikes/HiltmonDotCom/_config.yml
            Source: source
       Destination: public
  Liquid Exception: blockquote tag was never closed in _posts/2012-01-26-where-the-light-is-better.markdown/#excerpt

The post had the closing tag, but the excerpt did not.

To correct this problem, I added the following line in my _config.yml to excerpt manually or the whole post:

excerpt_separator: "<!--more-->"

The site now generates just fine.

Once again, my utmost respect and thanks to Brandon Mathis for creating and maintaining this lovely Octopress blog wrapper on top of the excellent work by Tom Preston Werner and the team who create and maintain Jekyll.

Follow the author as @hiltmon on Twitter and @hiltmon on App.Net. Mute #xpost on one.