Blog.

Migrating my blog once again

Nicolas Bello Camilletti
Nicolas Bello Camilletti
5 min read

I already have two post about the migrations of my blog engine to a new stack in the past. I first started writing in my previous work's Wordpress so my first attempt was to keep using Wordpress at that time. I created a VM on Azure, installed docker and Wordpress in it and, of course, I wrote about how I created that blog using docker containers and nginx in an Azure VM.

After that, I started using medium, to focus on writing instead of all the mantaining and other stuff but that didn't keep for long as medium started to add too many changes and walls. So, I went back to maintain my own site and created a blog in gatsby.js which works great for a while.

A few months ago, when I was trying to write some new content, I realized that I haven't updated the dependencies for quite some time and the site started to fail on running locally as well as on deploying (as this was an static site, it was build on every push to the repository using Azure DevOps Pipelines). I tried to see what dependency was causing issues but after some time I decided that the best was to migrate once again. I was using a very old version of gatbsy with too many custom things to migrate to a new one and I wasn't very happy with the results either.

The base stack

I started investigating what would be the best and created some spikes. After a time, I thought that the best would be to use something more simpler, which I was already using in the everyday, so it could be easier to build as well as maintain. That is when I decided to use next.js as the base stack. As I already had all my blog posts in markdown and I wanted to keep the static site approach, so I choose the blog-starter example as base which already has Tailwind and Typescript support and uses remark for procesing the markdown posts.

As the base example is a bit too simple, I started playing around with it and added things like comments support using disqus (which was what I used in the past). Additionally, I updated the styles a bit to give it a personal touch and added some extra things like analytics and such. I also updated the markdown processing pipeline to support code snippets and other smaller improvements. I will be writing a follow up post on some of those things but if you want any particular information just add a comment or ping me on my social networks (you can always find me as nbellocam).

The infrastructure

For building and deploying the site I wanted to move to GitHub Actions which is (very similar to Azure Pipelines) because my repository was on GitHub. My idea behind this migration was to remove tools and again simplify everything a bit.

Regarding the deployment, I was previously using firebase sites and it always worked fine for me, so I choose to keep using it. For the traffic I have and my general needs it works perfectly and it's free which is a great win. There are many great alternatives nowadays, but, as I mentioned before, I was already using that platform and it was simpler to keep using it as I already have my domain configured there. Additionally, I keep using cloudflare to cache the content.

Some extra considerations

When migrating sites from a stack or platform to another, you always need to consider not only the visible costs but also all the hidden things like the work you will need to do to keep everything working as before. For example, one important thing for a blog site is to keep all the routes, sitemaps and SEO information as before. If you don't plan to do that, you will end up starting all over again with the search engines which in general is very hard. In my case, I updated the base template to use the paths I used to have and also generated a sitemap which wasn't available on the original example.

Final thoughts

All this migration took time and effort which I could have used to create more content or other things, but it's also great way to keep learning new things and play around with new stuff. Even when it can be hard, it's good to dedicate some time to things like this and also invest in yourself to make your life a bit simpler and happier in the long term.

I will be adding some extra posts about what I found most interesting during thisprocess as I did in the past, but you can ask me for any particular thing.


More Stories

Caching Strategies for Service Workers: Maximizing Performance for Your Web App

7 min read

If you're looking to create a smooth and fast web experience for your users, one of the most important things you can do is to implement a…

Nicolas Bello Camilletti
Nicolas Bello Camilletti

Calling Microsoft Graph API from an Azure Function using JavaScript

8 min read

Not so long ago, I worked on a project where we take advantage of the Microsoft Graph API to perform some tasks. So far, nothing special as…

Nicolas Bello Camilletti
Nicolas Bello Camilletti