skip to content
blog.metters.dev

Goodbye Hexo, hello Astro!

/ 2 min read

A few days or weeks ago, I finally moved my blog away from using Hexo as SSG. Due to work and holiday, I haven’t had the time to write about it—yet.

Because I still like the cactus theme, I wanted to keep it for my blog. The template I used before is written in Stylus, a DSL I do not want to learn and not similar to anything I have learnt so far. Therefore, it is quite cumbersome to make changes on the theme, even minor ones.

I feel more familiar with React, so Gatsby is a more natural choice, instead of Hexo. After a quick search, I found out that Chris M. Williams has created a Cactus Theme for Gatsby, based on the original Cactus Theme for Hexo. Unfortunately, the repository has not seen a commit for quite a while, because the author focuses on maintaining his Cactus Theme with another technology: Astro.

I haven’t heard of Astro before, but why not give it a shot? Before migrating I would evaluate Astro first, of course. It worked immediately, and I could make changes without breaking everything or feeling totally lost. True, this *.astro file extension was still new, but I did understand most of the content without understanding all of Astro.

It seemed worth the shot, so I invested a few evenings and migrated one and then a few more blog posts, to see what it would look and feel like. When talking about ‘migration’ I mean adapting the frontmatter of the markdown files. After that, I tried to tweak the styling, so the site would look more like what I wanted.

So far, I am happy with using Astro, it definitely offers more room for tinkering around. This was not a ‘this-is-the-most-suitable-technology’-decision, nor a ‘this-is-exactly-what-I-was-looking-for’-decision, but one that followed my gut-feeling. The only thing I miss from Hexo is the scaffolding: using hexo new post "Name of the post" was quite convenient. I am sure there is a solution or substitute for that, too.