Website reboot version 3.

Rebuilding my website from scratch with a static site generator.

Posted by Matthew Regis on Tue, Nov 1, 2016
In Development, Go, Web
Tags web, go, development, code

Intro

So for a while now I had been contemplating redoing my website again. I wasn’t quite happy with what I had produced. I’d basically used a tool to create some static web pages and hacked it into a umbraco cms, well that’s what it felt like. If you want to check it out go to https://matthewregis.net. The developer in me wasn’t satisfied with what I produced and how I produced it. I wanted to produce a website that I would be happy with and have fun doing it in the process.

So I looked around for what I would use next. What I wanted was fast and at first I thought about using .Net Core. Unitl I was browsing a developemnt blog and looked at the source code, written by the developer was a comment that the website had been created using jekyll.

I had no idea what jekyll was at the time, but it led me into the world of static site generators.

Static Site Generators

The name is pretty self explanatory and I had a good idea of what it would be, fast and easy to host pretty much anywhere because at the end of the day it just produces static files. There are no dependencies to install on the server and no updates or patches I have to worry about.

What I didn’t know at the time though was how it worked. What I found out is essentially what these generators do is take a repository of files, run through a compilation process and produce a static site ready to be dropped and hosted anywhere.

There are many static site generators but the main ones I looked into are Jekyll and Hugo. If your interested in looking at others you can look at the following link https://www.staticgen.com/.

Jekyll vs Hugo

Jekell is the most widley used at the moment. Orignally created by GitHub’s founder, Tom Preston-Werner and written in ruby. https://jekyllrb.com/.

Hugo is written in Go orignally created by Steve Francia, now at time of this writing a memeber of the Go team at Google. https://gohugo.io/

I’d tried using Jekyll but before I got into too deep I looked at other static site generators, Hugo being the main one which is what I choose to go with in the end. So why did I go with Hugo in the end.

  1. It’s fast - Hugo is built on Go whcih makes it fast at generating sites, even sites with 5000 pages. I have also seen a number of people mention how Jekell starts to get slower and slower after adding more pages. You might think why does this matter it’s still static web pages at the end of the day, well I guess this is a prefrence I prefer.

  2. It’s simple - Jekell’s dev enviorment is not the most simplest to get up and running, you have to install this and install that to get certain features. Whereas installing Hugo is as simple as installing a binary. Easy to use, easy to upgrade. I got this working on my Mac and Windows laptop with no fuss. The structure is also very simple, which makes it easy to hack away and get the results i’m looking for which matched my needs for now.

Summary

If your looking for a static site generator, I would say look for something that matches your needs. Hugo might not be what your looking for. I tried to find a one fits all, but as often is the case that doesn’t exsist and therefore I went with what matched my needs simplicity and speed.


comments powered by Disqus