Back to Posts

Setting Up This Site

Posted in Code

First there was a purely html site. I was about eleven.

Then, there was the Wordpress blog (or maybe Blogger). I was probably about thirteen.

After that came the social networks, Myspace, Bebo, Twitter, Facebook and Instagram, and then I decided I needed an actual blog for some reason. In my naivety I went for a full blown CMS stack, Mezzanine, a Django project. It took about a week solid, buying server space, setting up the entire site, finding a theme, tweaking the theme, breaking the theme, etc. I didn’t post a single thing.

Finally today I decided I would knuckle down, build a nice simple blog and actually post to it. I feel like I’ve actually got things to say now, things about maths and programming and the different projects I’ve done over the last few years. But I needed to keep it simple. Enter Jekyll.

Jekyll

I’d heard about Jekyll when I was last researching how I might want to build my blog. It basically works in the same way as large scale CMS’s like Wordpress and Django-CMS by using templates to serve up information like blog posts. While CMSs typically store their information in a database and interact with it as the user needs it, Jekyll is a static site generator, meaning all the information is stored in (typically) markdown files and then the entire site generated as a static site. When I first thought of doing a blog, Jekyll seemed too simple, maybe a bit inflexible without an interactive client-server thing going on. Having over the last 12 hours built the blog in a day, I can say that I was wrong and the thing that took the longest was actually settling on a theme (because there are a lot).

There is a good reason why I like Jekyll now. It is to blogs what a cafetiere is to coffee makers. Sure, you could go down the route of buying a fancy electric coffee maker that automatically grinds the beans and makes you coffee that’s ready just before you knew you wanted it, and that might be exactly what’s needed for an office. I mean can you imagine thirty people using the same cafetiere? But what if it’s just you, and you don’t really know how fancy coffee makers work, and you don’t really have the time to figure them out, and you frankly just want some coffee? Why would you go for the option that’s overkill?

Although the analogy to the coffee makers is a bit tongue-in-cheek, hopefully you can appreciate where I’m coming from in that, for a simple blog, Jekyll is all I need. As a plus, I haven’t spent a thing on hosting or domain names this time around since I’ve decided that Github Pages, with its free hosting and domain name, is absolutely fine.

The workflow I’ve settled on begins with modifying a local version of the site, which I set up following the Github Pages tutorial. I can test it by running from the site root directory the command

jekyll serve

and checking that the site is working fine in my browser. Then I simply push the changes to github and usually within minutes the site is live.

Minimal Mistakes

Once I’d settled on Jekyll, I had to find a theme to base my design on. I’m no web designer so I worked primarily by finding a base theme, Minimal Mistakes by Michael Rose, then looking through blogs that I like the look of and trying to emulate the bits that I really liked. For instance, I felt that posts needed something to make major headings stand out a little more, to really highlight separate sections. I didn’t want to use lines across the page, so after seeing the little solid bars to the left of the headings in Game Programming Patterns, I went ahead and implemented them. It looks a little clunky still in my opinion so I’ll probably change it later, but in keeping with my simple philosophy for the rest of the site-building project, it’ll do for my needs right now.


Header Image Credit: unsplash-logoJan Kahánek

Jamie Quinn was born in Glasgow and raised on a steady diet of music, technology and delicious food. He is now a full time PhD student at the University of Glasgow investigating fluid dynamics, solar physics and damn hot plasmas.