I’ve been looking to re-launch my blog recently and be a bit more active in contributing to the community. While doing so, I wanted to change my existing blogging platform as well as hosting.
Looking For a Light-Weight Blogging Platform
When I fist started blogging, I went for the Orchard Project as the blogging platform. I was hoping that it would be light, MVC-based platform that would be easy to manage and maintain. I was a bit dissapointed with Orchard - it was pretty heavy, development was cumbersome, the performance was low and overall felt like a bit of an overkill.
Looking at a new framework, I had several requirements. It had to be fast, simple and be able to handle
- archive & monthly archive
- widgets to load latest & custom
- ability to generate custom content pages
And then I stumbled upon Octopress
Unlike the traditional CMS projects, octopress is a blog-aware static content site generator. It runs on top of Jekyll which is the engine behind GitHub pages.
The content is generated from the markdown files you create. Jekyll alone does not have a great deal of html templates and css/js - that’s where Octopress comes in. It gives you an awesome framework that you can take forward and tweak to your liking, directly in the code.
The fact that all the content is static makes your site super-fast - as demonstrated in the graph below.
Living with Octopress
Having used Octopress for few weeks now, the experience has been great. The ability to change html/css directly is great as well as no need to have data-store in place. The deployment is simple and straightforwards as well as backups. In short, exactly what I a was after.
Installing Octopress is super-easy. The two main dependencies are Ruby and Git, which most devs will have anyway.
git clone git://github.com/imathis/octopress.git octopress cd octopress
You will then need to install couple of other gem dependencies and install octopress - to setup dirs and structure
gem install bundler rbenv rehash # If you use rbenv, rehash to be able to run the bundle command bundle install rake install
Octopress has a concept of templates/layouts and includes which you can include to avoid repetition. You can find them in /source/_layouts and /source/_includes
Once you have Octopress up and running, you can start creating posts. There are rake methods to do that as a shortcut.
To create a new post, run
rake new_post["A new post Title"]
This will create a new markdown file in /source/_posts. Each post contains a set of variables and the actual content. You can also add your own on top of the pre-defined.
--- layout: post title: "SASS with Visual Studio Part 1 Introduction" date: 2011-09-11 15:01:30 +0000 comments: true categories: [SASS, CSS, Visual Studio] customVariable: "Custom content" image: /images/posts/sass/sass_thumb.jpg --- This is a start of the content ...
Once you’re happy with the content, you can run another rake task to produce the content.
The generated files will end up in /public
Octopress is an ideal choice for any developer. In fact, there was very little that it couldn’t do out of the box or I couldn’t change right away.
It was super easy to change any html and tweak any shared components. There are lots of plugins available, the only additional bit that I was interested was a monthly archive which I borrowed from here.
One of the nicest things about Octopress is the ease of back-ups. With no dependencies on DBs or any other storage, I tend to simply push the entire blog onto a public github account.
That means I have a permanent backup and I can clone and start updating the content anywhere. Changing hosting providers is a matter of minutes rather than hours.
All that octopress needs is an http server in front. It supports a simple push to something like GitHub pages or Rsync to your own server. You can also easily write your own rake tasks to push the content anywhere.
Any questions, give me a shout @mirajavora