I started blogging 10 years ago on Blogspot where I was mostly writing about literature, art, photography, and self-reflections (but not as explicit as a diary).
Today, I do blogging from more a professional standpoint where I can share knowledge with others and record notes for my future self.
Finding the right framework
In 2017, I decided to start blogging, and I started with Jekyll, with jekyll-now theme, which was completely by chance. I was trying to enter the tech world back then and I was not completely aware of the decisions on the table. The solution went okay though, for almost 2 years, it was the platform and I hosted it on Github Pages.
I was okay with Jekyll but the development did not seem very smooth so I started looking for alternatives. For a while, I tried Hugo, which is a fast static site generator written with Go, but I found its structure was more opinionated as well as the templating format was very similar to Jekyll.
Later, in 2019, I realized that there is a new shiny static site framework online that people create super-fast, good-looking websites. Upon a short research, I found out the GatsbyJS. It was based on JS and React, but I wanted to try out as I believed (and still do) that JS is the de-facto language of the web, and all the JS topics were hot back then.
I rolled up my sleeves to move my blog out from Jekyll to GatsbyJS. I first pulled Gatsby Default Starter theme and tried to adapt it. I also moved the hosting to Netlify, which a common stack with GatsbyJS.
Finally, before the end of 2020, I discovered the beautiful Next.js. It did not take a lot to understand that it could be the framework to revamp the blog. Together with MDX and Tailwind CSS, I created the first version of it even with the dark mode (thanks to the TailwindCSS), which is very popular these days.
I also moved my hosting to Vercel, not because I was not happy with Netlify, but because Next.js seemed more integrated with Vercel (as they are developed by the same company).
I can say that it looks like this year I am ready to spend more time on the blog website like I will write more posts, and spend some time on the overall design to make the UX better, and learn all the things along the way.
With Next.js, I feel for the first time that I can control my blog framework at 100%, don't need to rely on a theme or a custom solution I find online when I am stuck.
A short comparison of Next.js vs GatsbyJS
Overall, I think the developer experience is much better with Next.js. It feels that I have more control.
Next.js opinionated enough to find the way around and easy to learn. For example, routing can be handled in many different ways with React, but NextJS offers one solution and if you stick to that you are free from the burden of choosing something.
Next.js offers file-system based routing and it's pretty intuitive. For other routing operations (e.g. dynamic), there is a routing component, 'next/router'.
SSG (Static Site Generation) and SSR (Server Side Rendering) are better with
getServerSidePropsrespectively than doing data management with GraphQL.
For the blog posts, I use ISR (Incremental Static Regeneration), which is more
of a hybrid approach between SSR and SSG. I pull posts from a source and set
revalidate for an hour, which means that every hour, the content will be
pulled from the source and the data will be refreshed. I suppose GatsbyJS also
has this feature now called Incremental
but I have never used it myself.
All in all, it looks like they overlap in many features, but the user experience and the dev experience are the most important aspects I can expect from a blog framework.