I’ve finally gotten around to converting this blog over to Octopress 3. The last hangup was the silliest issue. I was running the commands in the wrong directory.
Octopress 2 vs. 3
Back at the start of 2014 when I originally set up this blog, it was actually a PITA it get v2 set up. A big part of this was due to the confusing way the markdown/sass source and generated HTML site was stored. The source was actually stored in a
source branch, disconnected from the
master branch in the same repo, the latter being where the generated site ended up. You’d have to make sure
source was checked out before running any of the
rake commands or else get really confusing errors.
To deploy, you’d run
rake generate && rake deploy which generates the static content and deploys that according to the configuration. In my case, deploying to GitHub Pages would update the site, but I’d still have to switch to the master branch and pull to update that branch.
Much improved over a fancy Rakefile, Octopress 3 is a collection of gems.
The CLI commands are now more intuitive:
octopress new post "Jekyll's Ferarri" git commit -am "Add 'Jekyll's Ferarri' post" octopress deploy
I could never remember the
rake new_post["title"] syntax.
Now, instead of creating your blog from a fork of the framework used to generate it, these two are now cleanly separated. The framework is installed and updated through rubygems while the blog source and generated content are stored in two separate git repos. At least, that’s how it’s arranged when you’re deploying to GitHub Pages.
The only point I had trouble with was previewing the site using
bundle exec jekyll serve. I got all kinds of build warnings about missing layouts. It certainly seemed like a path issue, but digging through the config and sass source I couldn’t find anything obviously wrong. Turns out the issue is that this Jekyll command must be run from inside the www directory.
Now that it’s live on Octopress 3, this site doesn’t look as nice. It’s just using a default Jekyll theme. There are a ton of themes out there for Octopress 2, but since 3 isn’t finished there aren’t a lot of people using it yet or making themes for it. Hopefully, it will be easy to adapt a Jekyll theme.