I originally had a blog set up using Wordpress.com as it was easy to maintain and quite cheap for a 3 year deal. Now that the subscription has ended, I wanted to try a new method of hosting my blog. At first, I was going to use Umbraco and host it on App Services, but that became a bit too expensive as I would need to have SQL Server hosted somewhere. In the end, I decided to use Hugo and have this hosted up using Netlify.

Migrating from wordpress

The first thing I needed to do was first migrate the blog out of Wordpress. This was done by exporting all the posts out of Wordpress. Once exported into a XML file, I was then able to run npx wordpress-export-to-markdown --post-folders=false --prefix-data=true. This exported my posts, which wasn’t many, into individual .md files that can be hosted using Hugo.

Installing Hugo

After migrating the files, I had to isntall Hugo which was relatively painless and easy to do. Essentially, I followed the steps in Hugo and was able to get it up and running within a few minutes. Choosing the theme took a bit longer as they were all quite good to begin with. I ended up using Papermod as a theme which I thought was quite nice to look at.

Papermod theme

The original papermod theme can be found at PaperMod but I forked it to my own personal repository to be able to make some tweaks to it. For example, instead of Next page or Previous page, I felt that it would make more sense to have a Previous post and Next post.

Netlify

To get this up and running, I decided to host the site using Netlify, because of its ease of use as well as the fact that it’s free. Netlify really made it easy for me to host this as all I needed to do is to give it access to my Github account. I’ve set it up to use the main branch and any commits pushed into the branch would automatically trigger the build.

I’m using a netlify.toml file to configure the Hugo version as there were some issues originally with the standard Netlify’s Hugo version. Setting it to version 0.85 allowed the build to go through properly.

All in all, it was quite an interesting learning experience. To get something up easily and have the pipeline working was a rewarding experience. Also, I’m getting more used to using VS Code and MD files to create my blog which made it quite fun.