I used Ghost for a while. It’s a simple and straightforward platform that simply gets out of the way and lets you write and publish a blog. And I’ve been a happy customer of the hosted version, paying a bit less than $100 a year for it. However, recently Ghost decided to raise prices by more than 100% and target a higher end market. At which point it’s hard for me to justify the expense. So I began looking for alternatives.
One reasonable approach would have been to install Ghost in a shared VM and use the open source version instead of the hosted one. And there are quite a few cloud providers that provide quick installs of Ghost, like for example Digital Ocean, which is fairly affordable, starting at 5$ a month. Another one would be Scaleway, which is even cheaper, at 3 Euro a month.
Of course, I could also have switched completely to a platform like Medium, which has some advantages, like an embedded sharing mechanism, and a great looking template. However, that would have implied giving up control over all the content and structure of the blog. Including for example the pattern of the URLs. Medium ends URLs in a random sequence of characters. It would have been a hassle to add all the required redirects to prevent old pages from breaking.
Eventually I found about Github pages. Github provides a very basic solution for hosting static content. By itself, Github pages is not terribly interesting for a blog, because a blog is not completely static. For example, when a new post is added an index or an rss feed needs to be updated as well. And that’s where Jekyll comes in. Jekyll is a static website generator. It takes text content in Markdown and generates a fully formatted HTML site, including indices and RSS feeds. So in order to publish a blog one only needs to add a file, re-run Jekyll and then publish the resulting output.
The key that makes this workflow practical is that Github pages is tightly integrated with Jekyll. So I didn’t even need to install Jekyll locally and run it after every change. I can just check in the blog post files in a Github repo, and it takes care of everything else.
Jekyll also supports templates, including a small library of predefined templates. The quality and variety are not really comparable to Wordpress. However, the level of customization is fantastic. Also whereas many Wordpress templates are complex and full of undocumented code, Jekyll templates are very simple and easy to modify, and at the same time quite powerful. Including, for example, defining variables for each blog post in the source markdown file, and have the HTML generator use that data.
This post appeared first at http://www.javiertordable.com/github-pages-as-blogging-platform/