Adding Comments, broke this blog!
Adding Comments, broke this blog!
For the last few months, I’ve been getting pretty good at pushing out blog posts on a weekly basis. My idea for the post due on the 7th of October was going to be around re-enabling comments on my blog posts for the first time since around 2020.
A 6yo Blog without comments?
A brief history was planned, basically I posted something to do with Web3 in 2020 and unleashed a tornado of spam upon my blog and the tool I was using at the time just wasn’t keeping up. So I simply turned the comments off. I’ve moved my blog to different platforms at least twice since then, I no longer have any of the old comments, but that probably doesn’t matter anyway.
I’ve had a few people contact me through LinkedIn or Twitter regarding my blog posts (I love you people btw). So if I have regular or semi-regular readers, I felt it was time to re-enable the comments section.
Gatsby kinda sucks (sometimes)
I don’t really know why, but my Gatsby build falls over nearly every other week. Now, the blog is fairly rock solid, but the way I go about things is that I write a new blog-post in a Markdown file on my computer, push that post up to GitHub and one of the Netlify bots sees the change and rebuilds the site with the new article and assets.
It should just work, it often does, well, at least 50% of the time anyway.
But sometimes, the build fails with a, usually, useless error message. I’ve learned over the last few months to ignore the messages and just push the build again, it nearly always works the second time. This suggests to me that there wasn’t really anything wrong with the build on the first push.
Netlify to blame?
Maybe, but this is not the only thing I push regular updates to that sit with Netlify, I never have the same issue with the other resources. I do get issues, just not the same ones.
I don’t think the blog is too big, it’s only around 50 posts in size I guess.
Customisations
Okay, hands up, the blog has a number of minor customisations that make it work just a bit closer to how I want it to work. It’s my blog and it has enough little changes to make it different from anyone elses.
I didn’t realise how many little changes I’d made until I started looking at moving my blog elsewhere. I only mention this because I cannot fully blame Gatsby for the situation I have today, it may well be something I’ve done that has introduced these issues.
Astro
I started last week by building a Github based comments integration into my Gatsby blog, it took me down a path where things just fell apart. I still don’t have comments enabled. I had a few packages that had fallen behind, updating those put me in a cycle of trying to update things that were not compatible with other things which caused more issues somewhere else and in the end I gave up on that.
I had already been playing the ‘build’ Lotto game in my head for a few weeks: If the build fails this time, I try to push one more time, if it fails, we’re rebuilding the blog in something else… so maybe my mind was semi-made-up to leave anyway, but after a few hours of fighting with Gatsby, I decided to just focus my efforts on rebuilding the Blog using Astro.
Astro is new to me, but I think I have a grasp on some of the benefits and for the way I use the blog, I think it’s likely a good fit.
OMD: A new hope…
I won’t go into the details here, building the new blog has been time consuming, perhaps for the first time, I realised just how many things I had customised in Gatsby (some of it feeds other parts of the internet) and trying to recreate that was not always easy.
The blog isn’t quite working how I want it to, but I like where it is at the minute. I hope next weeks blog post will be a breakdown of how I built the blog in Astro. For now, as of today at least, we’re still playing with Gatsby.
Update: This is now an Astro blog post
The migration has been mostly successful, at the time of writing this, the blog is now resting on the shoulders of Astro. I still have some ‘under-the-hood’ stuff to do and will no doubt tinker for a few weeks to come, but the blog as it is today, has been migrated.