Henrik Sommerfeld

Tag: Hugo

Lazy Loading Images in Hugo

When writing another post, I realised that I hadn't documented/described my image lazy loading implementation in Hugo anywhere, so here it comes. The first thing we need are responsive images, not the thing you get when setting the width to 100% in CSS, but different versions of the same image in different resolutions so that the web browser can pick the best one (using srcset). Read →

Gatsby vs Hugo for a Personal Blog

Having built two personal websites/blogs that are fairly similar, one using Gatsby and one using Hugo, I’ll take a moment to compare my experiences. All CSS is written from scratch for both sites, no framework. They both have categories and tags that you can use to find related posts. No server-side API is used, so once the build is done, everything is static. Well, I use Google Analytics and Disqus on both sites, but those are third-party API's that I don't have to manage. Read →

Hugo Timeout Not a Circular Loop in Shortcode

I have been getting a few random build errors with Hugo on Netlify recently. This is a bit strange, since it builds fine on my local machine and with Github Actions. Re-running the same build also worked a few times. The build log on Netlify says the following... Read →

Build Steps Using NPM Scripts for My Hugo Blog

Quite recently I migrated this blog from WordPress to Hugo. Since I didn’t want to use a theme built by someone else, I had to add things like CSS and JavaScript myself. To be able to work with this locally in an efficient way and to be able to produce a complete build output in a reproducible manner, I had to automate the build steps. With WordPress I used Gulp for this, but I thought that might not be needed, so I made an attempt to do this using only npm scripts. Read →

Switching from WordPress to Hugo

I have recently migrated my blog from WordPress to Hugo. That is, switching from a database-based web content management system with loads of themes, plugins and a large user base to a statically generated site with no server-side logic and a small feature set where I must build most things myself. The switch was by no means necessary, I had cheap hosting at a web hotel I will still use for other sites after the migration, speed was good with WP Super Cache and so on. Read →

No matching posts found. You can use wildcards and search only in titles, e.g. title:iot
Loading search index, please wait...
Search index failed to download 😢