Sometimes you shouldn't try to swim against the current.
Sometimes you shouldn’t try to swim against the current.
My old setup consisted of the following stack:
This setup, however, caused me a few issues. The Torchlight plugin seems to no longer be maintained; this meant I couldn’t upgrade from Laravel 10 which kind of disappointed me. I also had to do a lot of parsing tricks to get the headers from Markdown, for example.
I had heard a lot about Astro, mostly the fact that you can use whichever frontend framework you want. Astro also produces zero JavaScript if it’s unnecessary, this is crucial to me. I want my blog to compile to HTML as much as possible.
The migration didn’t go without any problems. It took me around 4 hours to migrate everything. Since I was using Markdown previously, I could just copy those articles to my new repository. Now no SQLite is needed; I now leverage the Astro Content Collections, making everything straightforward.
My blade files could almost be copied one to one, keeping my Tailwind classes intact. The only thing I needed to change here was the way I interact with the data.
Luckily enough, Astro has integrations for sitemap, so this was no work for me at all, probably less work than in Laravel.
The most challenging part was getting my article views from Fathom, in Laravel I just used a command for this which I ran every day and when I deploy. Now I created a GitHub Action to do the same but store these in a JSON file and commit the changes.
All in all, I think it was well worth it.
My conclusion is that picking the right tool for the job is crucial. I hope this migration will save me more time in the future.