New website

May 4, 2019 - by Paul Bosselaar

For some time now I wanted to really start with a new site/blog. With all the stuff that happened since 2018 I felt the need to write stuff down and to be more open then before. So to actually do that, I started this blog.

Being a software developer I wanted to create it myself of cource. So the first thing to do was to search for software or a framework to create the site in. One of the most common pieces of software to create a site or blog is Wordpress. And being the opiniated developer that I am, I quite dislike Wordpress. Why? Well, creating a good site in Wordpress can be harder then you might think. Wordpress itself simply does not have the functionality you actually need to get most things done. So you need to install 3rd party plugins to get the functionality that you need or create your own. Since my coding is mostly done in Java and Wordpress is PHP I do not like to code my own and it would take too much time to get a site up and running. Plugins are not always of the same quality and using more and more plugins will make Wordpress slow so even a lot of simple / small sites needs things like a caching plugin or even a CDN to get a speedy website.

So I started searching for alternatives. Yes, I’ve been tempted to start writing my own CMS a lot of times now. But that also takes quite a while to do. That would be a good excuse for not actually starting this site (“The CMS is not done yet!"), but since I wanted to actually start making content next to developing I opted for not writing my own (for now)

Static site generator

Most CMS’s require a backend and a database running on some server (either your own or hosted by someone else). I have my own server running so I did not want to use a CMS hosted by someone else. I also wanted something simple. After a bit of searching I ran into Jekyll which is a static site generator. You create the templates and content as files on our PC and Jekyll will generate the complete website out of that. You can then upload the website to a server. A blogpost is simple one (markdown) file and Jekyll will generate the HTML, archive pages, links, a posts page with all the posts including pagination if needed etc. I quite liked that idea.

To get Jekyll up and running you need Jekyll itself and a Ruby development enviroment up and running first. Since I don’t like Ruby so much and I didn’t want a Ruby enviroment installed I started searching again. This time for another static site generator

Hugo

The static site generator I ran into was Hugo. Hugo is written in Go which results in one binary file which includes everything. This way I did not need to install a (new) development enviroment to get up and running. I’ve been toying around with Go code as well so that was also a plus.

Hugo is fast. Generating this site is faster then a simple Wordpress install serving just one page. This (simple) sites takes less then 100 milliseconds to generate on my laptop. Hugo is not for everyone though because you do not get a wysiwyg editor. For me, that is not problem.

The end result of all this, is what you see here. A site containing only static files with only a webserver needed to serve those files. No Java, PHP or some other backend running. I can start writing posts on my laptop or PC anytime I want. When I’m done I simply run Hugo and move the files over to my webserver. The site and all the content is put into git so I have a complete history of everything and I can easily check the files out on different systems.