For a few years now I’ve thought that blogging is something every developer should do. Unfortunately I’ve never gotten to it. Up until now.
It’s only appropriate to start with a guide describing how to set up a blog.
My main reason for blogging is to become a better writer. I also think that one understands things much better when trying to explain them to somebody else.
Keeping those goals in mind, I’m free of some usual constraints associated with blogging. In particular I’m free to use:
- minimalistic design
- just my preference, but also easier to get right
- no comments
- I agree with Matt on this one
- no infinite gadgets
- content is the only thing that matters
- www subdomain
- ‘A blogging framework for hackers.’
- no DB
- blog in a Git repository
- uses static pages
- no admin interface
- Open Source
- customizable – Ruby
- healthy community
One thing that I particularly like about Octopress – it’s easy to be minimalistic. More about that some other time.
To exist, blogs need to be hosted somewhere. I was considering some PaaS offerings or dedicated hosting, when I stumbled upon a great idea. Why not just host the blog on Amazon S3? It’s all static anyway, and with S3 one gets infinite scaling for literally pennies.
It turns out that’s easy to do and there are no real downsides, at least considering my aforementioned intended usage.
What follows are some technical notes on how exactly to get a blog running.
One of the things I don’t like about Octopress – it’s not a gem. That leaves you with basically 2 options: fork it or add it as a remote.
I’ve decided to use my own repository. Also the probability of me submitting pull requests for blogging framework on a regular basis is quite slim. So I’ve decided to go with the second option.
When you’ve cloned the repository, get a quick taste of Octopress by running:
One issue I had with Octopress after forking it was that gem
was not working properly. I had to downgrade the version and add it explicitly
I like using gemsets, so I’ve modified
I also installed Aron Cedercrantz’s blog theme, and tweeked it a bit. Don’t forget to at least use your own favicon.
Next, configure Octopress to your likings. To start, take a look at
Finally, set up Octopress to use S3 for deployment. Robert Brewitz has a great post that sums up the whole process.
Only one thing left to add: don’t forget to configure 404 page for S3. This can be done in bucket properties, under `Static Website Hosting’.
Setting up Octopress blog on Amazon S3 is easy and efficient. If it suites your requirements (you use only static content) you should consider doing so.
There are still many improvements possible. It is possible to use Amazon’s Cloudfront in addition to S3. But for my needs that would just add unnecessary complexity. Your mileage may vary.
I’ve since decided to use Cloudfront. Not for the performance optimisation, but to add HTTPS support to the site. You can find out more here.