The Xmas break has finally given me some time to do something I’ve been trying to accomplish for a few years now.
Update my own website.
One thing about working as a developer full time is that your own website tends to be the last on the list to receive an update. There’s always client work that you should be doing! Also, sitting in front of a computer and working on yet another website is generally the last thing you want to do when you do find some time.
My old website has been ticking along on Wordpress essentially unchanged since 2009 (apart from security updates of course). It was definitely looking stale and not the best advert for someone who claims to be able to develop websites using modern standards.
As with any new website project, one of the first decisions was which system to use to run the site. As I say, it’s been running on Wordpress for years, but I must confess, I’m not a big fan of Wordpress. It’s fine for someone who has little to no web experience and needs to be able to update their site using an easy WYSIWYG interface. However, as someone who knows how to edit HTML directly, I find Wordpress, or any CMS for that matter, somewhat restricting. I often find that I know what I want to do, and it’s something I could easily code, but getting a CMS to do it in exactly the way I need is not always simple (if it’s possible at all). Obviously I could write my own plugin to perform a specific task and that is something I have done several times in the past for personal and client websites. However, that just becomes frustrating when all I really need is for the CMS to ‘get out of the way’.
Hello Hugo!
That is where Hugo comes in.
So what’s so different about Hugo? It’s not a CMS in the same way that Wordpress or CMSMS are, it is instead a static site generator. This means that you generate your site locally and then upload it to your web server. There’s no PHP generating the site on demand from templates and database content, it’s plain old HTML files that are built locally and uploaded.
So why would I want this? Surely it’s more complicated to have to build locally and upload?
Well, that is true in a way. Granted, I can’t just bash out a new post using my mobile and a web browser, however I can’t remember ever doing that anyway. So having to build locally and upload is not a big deal to me.
For me, the biggest advantage is versatility. Posts and pages are written using Markdown, so there’s no fighting with a WYSIWYG editor that thinks it knows how you want your content laid out better than you do. These Markdown files can be expanded using shortcodes, which are essentially reusable chunks of HTML that can be embedded wherever they are needed.
Yes Hugo has its limitations and it’s certainly not for everyone, but overall it’s a lot easier to code a quick, bespoke element that I need for a particular page, and include it exactly where I need it, than it would be when using a CMS. This mix of Markdown and bespoke HTML code (through shortcodes) offers great versatility.
Finally, of course, there’s the elephant in the room. Security. It seems not a week goes by without a major security issue being discovered in one Wordpress plugin or another. Hugo produces plain HTML with no PHP or SQL, so 99% of the web security issues we hear about are simply not possible.
So for me, 2021 is the year of Hugo. It’s early days yet, but I’m hoping we’ll become friends.