Chris Colborne

Which Headless CMS should I use for a new Gatsby site?

April 19, 2020

Illustration from unDraw

Gatsby is an awesome static site generator, but you need to get your data from somewhere. What are your options for headless CMSs?

What is Gatsby?

Gatsby is a free and open source framework based on React that helps developers build blazing fast websites and apps. It basically bashes together React, GraphQL and the so called JAM Stack to make some serious awesomeness.

What is the JAM Stack?

The JAM Stack is a name standing for a modern way of building sites/apps with JavaScript, APIs and Markup. Commonly it involves server side generated code from Markdown and/or API endpoints.

What is a headless CMS?

In this new JAM Stack world, your CMS backend and your frontend site are split. A headless CMS is simply a CMS which instead of pumping out HTML and CSS views, produces an API. There are many options from open source, to paid SaaS options, to trusty old WordPress.

What are the options?

Open source options

Netlify CMS

Netlify is one of the most common hosting providers for the JAM stack. They’ve built an open source SPA which you can install as an npm module on your site, to provide a CMS experience over GitHub and Markdown, complete with editorial workflow using pull requests.

Try it out

Strapi

Strapi is an open source, self hosted headless CMS written in Node. It provides both REST and GraphQL endpoints, with a customisable admin portal and API.

Try it out

Keystone

Keystone is a scalable, extensible and open-source platform to build NodeJS applications. It has first-class GraphQL support, and a great Admin UI.

Try it out

WordPress

Even though WordPress is obviously a full CMS and blogging platform, it can also be used as a headless CMS by using its REST API or using the WPGraphQL plugin to provide a GraphQL endpoint. One thing to note is that you may have more or less success depending on how many plugins you use.

Try it out

Software as a Service (SaaS)

Sanity

Sanity is one of the new breed of SaaS headless CMSs. It consists of an open source CMS admin UI which you install as an npm package and host. This allows you to easily extend for your own workflow with their extension ecosystem. The admin then connects to Sanity for storing the data, and for authentication.

Try it out | Pricing

Contentful

Contentful is one of the larger SaaS headless CMSs, and the oldest on our list here, being launched back in 2014. Clearly pitching themselves as the Enterprise solution, Contentful has the most clout, but also the price point to match. One thing to watch is that they may not have the features and extensibility common in the current generation of SaaS headless CMSs.

Try it out | Pricing

Prismic

Prismic is another of the new breed of SaaS headless CMSs. It provides an excellent hosted admin with the ability to easily add custom types, and publishes a REST and GraphQL API.

Try it out | Pricing

Forestry

Forestry has been described as Netlify CMS on steroids. Like Netlify CMS, it connects to GitHub to store markdown files which is great for portability. Unlike Netlify CMS however, Forestry also provides a hosted CMS admin UI, providing a more polished, managed solution. However you can also deploy the editor to your own site with Forestry Remote Admin.

Try it out | Pricing

Which one should you use?

Like everything, it depends! 🤷‍♂️

A lot of it comes down to how you want to store your data (git / hosted service) and the editing experience.

If it’s a commercial site, you’ve got the money, or just really want something turnkey, then try one of the SaaS options. They all have free plans to start, so sign up and try them out to see what fits.

If it’s a simple blog, Netlify CMS will do great. (in fact, I’m using it for this blog!)

If it’s a bigger site / application, give a more full powered solution a go such as Keystone or Strapi.

And if you need to work with clients, you might be stuck with WordPress, but at least you can have some shiny front end tech and they get the benefits of a performant, secure site.


Like what you've read?

Why not subscribe to my mailing list to get my latest articles by email.

I respect the privacy of your email address. You can unsubscribe at any time.

Written by Chris Colborne, an Aussie software engineer from Brisbane, Australia. Follow me on Twitter

Chris Colborne © 2023