Moving my blog from Hugo to Hashnode

Recently I realized that I haven't posted anything to my blog for almost 7 months image.png

Is not that I didn't have any ideas or topics to write about. It's just that my setup with hugo static website made writing more complicated than it shoul've been.

I initially chose hugo as it was the simplest static site generator that I've found. It was very easy to add a github-action that builds my blog and publishes the content to github-pages. Finally I simply added the DNS record in my Route53 console to resolve awsforhumans.xyz to Github IP adresses.

However, the publishing process was still too hard! Everytime I wanted to create a new post I need to cd to my blog directory execute hugo new posts/<name>.md Also I needed to paste images to static directory and make sure that the links in markdown files are correct.

Finally, my blog post had a dependancies on Go version installed on my machine, Hugo version and the theme that I was using.

One day I wanted to create a new short post but after entering hugo serve -D bunch of warnings popped up:

WARN 2022/07/16 15:44:44 found no layout file for "HTML" for kind "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

I tried to fix these errors but this is when I realized that my blog has too many moving parts. I loved the flexibility of Hugo but I should focus on writing and not on building a website.

Enter Hashnode

This is when I decided to migrate my blog to Hashnode. At first glance Hasnode seems like a great platform as it allows content discovery but also you remain the owner of your content. It also allows adding your custom domain very easily.

Finally creating a new post is now as simple as hitting: hn.new in my web browser.

No more need to worry about github action maintenance, linking images or anything else. I can just write in the same Markdown format that I'm used to and publish in minutes

Migration to Hashnode:

To migrate to Hashnode I simply changed the DNS record in my Route53 console to point to the hashnode: Screenshot 2022-07-16 at 16.10.47.png

Finally I uploaded my a zipfile with Mardown files from my /posts directory. The import worked great. There are only a few problems with that:

  1. If you used Hugo shortcuts in your files they will not work with Hashnode so they need to be updated
  2. Images will need to be reuploaded.

Since I don't have a ton of posts I will be able to go through them and fix them soon.

Meanwhile, I hope that I will start writing more now that I have a Hashnode blog set up

See you soon,

Laurynas

Did you find this article valuable?

Support Laurynas Tumosa by becoming a sponsor. Any amount is appreciated!