A brief history lesson. In the beginning there was Jekyll, a website generator that created static sites for you to deploy to your server. And then there was Octopress, a ‘framework’ for Jekyll that actually was a fork of one guy’s Jekyll site.
Octopress is basically some guy’s Jekyll blog you can fork and modify.
That’s a direct quote from Brandon Mathis, the creator and curator of Octopress. But it wasn’t a framework like WordPress people think of Frameworks. It wasn’t like Underscores, which is just a theme framework. It really was more like a one-click install for Jekyll, that had someone’s theme on it.
Wisely, Mathis is working on changing this. Starting with Octopress 3 (currently 3.0.11) it’s a Jekyll add-on. While there is no ‘migration’ explanation yet, if you’ve never used Octopress, it’s a great time to start.
How to Install
Add this line to your application’s Gemfile:
gem 'octopress', '~> 3.0'
And then execute:
$ bundle
You can also install with bundler if you want, but it works out about the same in the end.
How to Use
I was stuck using bundler on my personal computer. That meant to use Octopress I had to do this:
$ bundle exec octopress COMMAND
Sucks, doesn’t it? After reading Ben Hamill’s post about ‘never typing bundle exec again’, it was fixed! I used the Ruby fix since it’s just me on the project.
Now I can use octopress
as my command prefix.
What I Dig
The deploy is way better than my own. Just put that out there.
Also there’s a draft command!
$ octopress new page _legal/terms/
That will make the file /_legal/terms/index.html
and I’m happy. If I want to use custom templates, I can do that too:
$ octopress new draft "New Article" _news/2015/articlename --slug articlename --template _template/news --date now
Sadly I can’t move the template folder. I wanted to store it in _jekyll/templates/
but that’s not an option. Also moving things to the _drafts
folder is a little techy at best, since they assume you want to make posts and I’m making collection pages.
Most of the time I do exactly what I was doing with MediaWiki, and that is to copy the content of an existing file into a new one. Most of the time I just copy the file, rename, and edit it. It’s not perfect, but it works and I know I get the right layout that way. I plan to look into why drafts is so touchy about where things are, and how to make it behave better with collections, but Octopress 3 is still in the early stages.