Published on

I needed a new blog

Authors

TLDR: I used Tailwind Nextjs Starter Blog for my blog

I haven't written that much in here, you can tell from the sad amount of articles. I'm not an avid writer and I find the process hard. In addition, every time I was coming back to this blog I was met with the struggle to learn back the CMS I installed at the time and learn to hate it again.

I went through many stacks during the past years:

  • Pure Wordpress
  • Wordpress as headless CMS + react
  • jamstack with 11ty
  • jamstack with gatsby

and I hated the experience with most (all?) of them. Both in developing the blog and using it.

I think I'm a simple user as a blogger, my requirements were quite simple, and that was frustrating. I think this is a very common path for developers working with content, one that is explained incredibly well by a post from ContentLayer.

I will be listing here my requirements so that you will know if the stack I've used matches your needs.

  • Deploy on Netlify. (or on Vercel if I really need to)

Mostly because Netlify pricing makes sense for a small blog like this and I had all domain / forms / dev-ops already set-up.

  • Local content. No Contentful / Sanity.io.

To feel more indipendent and less stuck with one or the other service

  • Markdown or Extended Markdown

I love writing .md/.mdx files directly.

  • Copy & Paste of images

I want to go from clipboard to an image saved into a folder and linked into my markdown file, in one click

  • Expand and Maintain

One repo. Easy to setup (2hrs max). Easy to create components or find existing ones. Not that I need many, but I like to play around as everyone else. It also need to be built with technologies I know will be still alive and well in the next 24 months.

Netlify CMS / Contentful / Sanity

Why not? I liked Contentful and Sanity. I hated Netlify CMS. It is too limited and doesn't give any huge improvements on the other too. The amount of components is limited and not easily expandable. They also prefer to use rich text files that are impossible to edit directly through a text editor.

It also has random errors that make the experience unusable. This one, for example, makes your cursor jump around while working in the CMS, all while polluting your Markdown file with non-ascii characters. This bug was alive and well in 2022 and is probably fixed in future versions, nonetheless it still affect many gatsby/Next.js/11ty templates with netlify CMS support.

I could've probably managed to fix it by upgrading the NPM packages in various template I tried, but that would've taken too much effort, to have a CMS that gives me very little functionality.

The process

The process is simple. You scour the internet for a bunch of keywords containing the world 'blog' and some technological terms and see where it lands: "Next.js sanity blog template", "gatsby sanity blog template" "netlify contentful quick blog 2023", or "gatsby template netlify blog".

I landed first on https://gatsbytemplates.io/ and downloaded a couple of the free templates. Many of them worked with netlify CMS, very few worked or were still maintained.

I also found https://www.sanity.io/blog/build-your-own-blog-with-sanity-and-next-js which is a very good guide on how to build a skeleton for a blog based on Next.js and sanity. It worked seamlessly but gave me no template and I decided not to try to add a template to it as I'm not that versatile in Next.js.

The solution

I landed on Tailwind Nextjs Starter Blog after the sanity.io blog post as I liked the freedom Next.js was giving me managing content and layout. It is a Next.js, Tailwind CSS blogging starter template, ituses Contentlayer to manage markdown content. It is tailored for personal blogs and can be deployed on Vercel (and Netlify) out-of-the-box.

If you read through the examples you might see some differences here and there that show what you can build from the starter template but honestly I wasn't looking to customize the template at all.

It does support ContentLayer which solves all the issues I had so far with opinionated services like Contentful and Sanity.io, or with working with local unstructured Markdown files. I will probably be giving it a whole article of its own.

The deployment on netlify was quite straightforward. You might read the linked next.js documentation on netlify.com but in the end using

  • build command: next build
  • publish directory: .next

is enough.

Conclusion

As for every technology decision, it all comes down to knowing your requirements and finding the right supplier. Having a clear list of what I needed helped me filter through all the possible stacks and try some first possible solutions. In this case the right supplier is a project that has some history but also the correct community . Will I ever move away from the Tailwind Nextjs Starter Blog? Maybe so, but I know a project like this is going to be able to support me for the next 24 months.