Migration to Astro
This website has been around for several years and has not evolved since. This is because I mainly use this domain for mailing and experiments, such as with Cloudflare Workers.
Reason for the migration
I’ve encountered several issues while trying to upgrade the Static Site Gerator tool (Hugo) and the Theme (LoveIt) to their most recent versions. While trying to solve the issues, I discovered that the theme has not been updated since 2022 and is no longer compatible with recent Hugo versions. Correcting the errors or moving to another theme would take some time and didn’t seem like a future proof solution.
Therefore, I started looking for a replacement for the Hugo SSG tool. During the research, I came across two valid options:
After reading many comments on Reddit and posts on several sites, I chose Astro.
Reasons for both:
- Regular updates for the tool.
- Easy configuration and no need for special templates.
- Runs on NodeJS, so no new application required to install.
- Supported by many static hosting providers (Netlify, Cloudflare) for automatic deployment via Git.
Reasons specific for Astro:
- Looks more ready-to-start and all-in-one compared to 11ty.
- Appears more commonly used when searching for config files via github.
Migration process
The Astro website has a great Getting started tutorial help you discover how you to create a site with this tool. Within one day, I had completed this tutorial.
The next step was to try migrating the blocks and content from Hugo to Astro. In Hugo, there was a large configuration file, but you had almost nothing to configure for the layout, pages or lists. In Astro, you have to create your own building blocks for both the layout and the lists.
After struggling a bit, I managed to recreate most of the elements of the previous theme, based on pure CSS and HTML code in Astro components. Therefore, in the future, I am no longer dependent on an external theme.
Another advantage of the migration was that I also leared more about latest features of CSS and HTML.
Astro-nomic result
This updated site is now built with Astro but still runs on Netlify servers, with Cloudflare on front of it. I hope regular updates will now be easier than in the past.