Einar's blog

Migration to Hugo

This is just a short blog post to tell you why things look differently on this site now than it used to. I used to use WordPress to manage the site. WordPress is nice because it gives you a nice GUI to manage everything, lots of nice templates to choose from for a nice layout of the site and many plugins available for extra features like contact forms, comments and whatever else you may imagine.

There are however a few negative sides of using WordPress as well. Since a lot of sites around the web use WordPress, the login for any WordPress site gets constantly hammered by bots trying to break in. The security of plugins might vary. I get a constant flow of spam from my contact form. Since WordPress is quite complex and dynamically fetches content from its database as you view the site, sites using it are a bit slower to load than static sites where all content is stored in files on the server. Usually, this doesn't matter, but for people on slow connections or using text based browsers, it can make a difference. It can also matter if a site gets lots of traffic.

Hugo is a static site generator. I first heard of it in a video by Bryan Lunduke on LBRY. What Hugo does is that it makes it easy to write content in Markdown, pick a theme for the website and generate the files for a static site from it. You just upload those files to your web host and then you have your site. You get the speed of a static site, but the advantage of not having to make all the cod manually. It is sort of a best of both worlds approach where you get the conveniance of a CMS (Content Management System) with the speed and security of a static site. Hugo can even make an RSS feed out of your static site so people can follow you without having to visit your site all the time.

Making the content with markdown is smart because markdown is pure text that you can edit in any text editor on any device. It also appeals to me that I can make the content locally on my machine, spit out the static site, have a look at it with Hugo's built in web server and do any necessary changes before uploading it to my web host. I often revise things after seeing the end result, and maybe I can improve my content before uploading by having the ability to see the end result before it is online. I know I can do this with drafts in WordPress, but drafts are also online when using WordPress and they are included in RSS feeds before actually being posted (which I think many news sites around the internet is not fully aware of).

All content is shared under the terms of the Creative Commons Attribution-ShareAlike license.