Gatsby.js Logo

Gatsby.js CMS

Powerful CMS. Zero headache.

Drop our API-based CMS into your Gatsby.js app in minutes.

Try ButterCMS free

"Best CMS on the market"



ButterCMS provides a CMS and content API for Gatsby.js apps. Use ButterCMS with Gatsby.js to enable dynamic content in your apps for page content, blogs, and more. Check out our Gatsby.js source plugin for a full example.

Above is quick video of integrating Butter's Pages API into an application.

Butter's API slides right into our apps and lets us avoid having yet another WordPress site.

Daniel, Founder of Collective Idea

Marketers love Butter

  • ButterCMS Feature Image SEO Landing Pages
  • ButterCMS Feature Image Customer Case Studies
  • ButterCMS Feature Image Company News & Updates
  • ButterCMS Feature Image Events + Webinar Pages
  • ButterCMS Feature Image Education Center
  • ButterCMS Feature Image Location Pages
  • ButterCMS Feature Image and more...

Butter saves you development time

Save thousands of dollars worth of development time with our easy setup.

Integrating Butter into our application took less than an hour and most of that time was spent on design work.

Luke Brean, Legally

Everything you need

  • ButterCMS Feature Image Custom Page Types
  • ButterCMS Feature Image Custom Content Modeling
  • ButterCMS Feature Image Preview changes
  • ButterCMS Feature Image Media library
  • ButterCMS Feature Image CDN for assets
  • ButterCMS Feature Image Testing environment
  • ButterCMS Feature Image Localization
  • ButterCMS Feature Image Webhooks

Beautiful admin interface

Easy to use. Easy to customize.

Integrates with Gatsby.js

Our CMS has a simple content API and drop-in Gatsby.js source plugin.

Butter requires zero maintenance

Never worry about security upgrades, hosting, or performance.

Try ButterCMS in your Gatsby.js app

Setup in minutes

Official Gatsby.js Guide



Integrating Butter into your Gatsby.js app is dead simple. Here's a mini tutorial to get a feel for of setting up your blog home and blog post pages. For full a integration guide check out our Official Gatsby.js Guide

Integrate into your application

With your homepage defined, the ButterCMS Pages API will return it in JSON format like this:

{
  "data": {
    "slug": "homepage",
    "fields": {
      "seo_title": "Anvils and Dynamite | Acme Co",
      "headline": "Acme Co provides supplies to your favorite cartoon heroes.",
      "hero_image": "https://cdn.buttercms.com/c8oSTGcwQDC5I58km5WV",
      "call_to_action": "Buy Now",
      "customer_logos": [
        {
          "logo_image": "https://cdn.buttercms.com/c8oSTGcwQDC5I58km5WV"
        },
        {
          "logo_image": "https://cdn.buttercms.com/c8oSTGcwQDC5I58km5WV"
        }
      ]
    }
  }
}

Now lets create the home page src/pages/index.js


import React from 'react'
import { graphql, Link } from 'gatsby'
import Layout from '../components/layout'
import SEO from '../components/seo'

const IndexPage = ({ data }) => {
  const home = data.home.edges[0].node

  return (
    <Layout>
      <SEO
        title={home.seo_title}
      />
      <div>
        <h1>{home.headline}</h1>
        <img src={home.hero_image} >
        <button>{home.call_to_action}</button>
      </div>

      <h1>Our Customers</h1>
      <div>
        {home.customer_logos.map(({ logo_image }) => (
          <img
            key={logo_image}
            src={logo_image}
          />
        ))}
      </div>
    </Layout>
  )
}

//GraphQl query to fetch homepage data
export const query = graphql`
  {
    home: allButterPage(filter: { slug: { eq: "homepage" } }) {
      edges {
        node {
          slug
          headline
          seo_title
          customer_logos {
            logo_image
          }
          hero_image
          call_to_action
        }
      }
    }
  }
`

export default IndexPage

That's it! Now run gatsby develop in your terminal and open localhost:8000/home to see the home page populated with the content you created on butter.

Configure the source plugin

Here you'll specify the config that will be needed to pull down data from butter. make sure to add your api_token from your dashboard, in this guide we will be add CMS capability to a Gatsby for blogging, marketing pages, and more. Below is an example gatsby-config.js file that you'll want to configure for your app. We dive into more detail on the config file in the official guide.

// Example gatsby-config.js file
module.exports = {
{
      resolve: `gatsby-source-buttercms`,
      options: {
        authToken: ``,
        // Optional. Returns values for the supplied content field keys.
        contentFields: {
          keys: [`faq_items`, `faq_headline`],
          // Optional. Set to 1 to enable test mode for viewing draft content.
          test: 0,
        },
        // Optional. Array of page slugs.
        pages: [`homepage`],
        // Optional. Array of page types.
        pageTypes: [`customer_case_study`],
      },
    },
}
Try ButterCMS in your Gatsby.js app

About ButterCMS

ButterCMS is an API-based, or "headless", CMS. We're a hosted service and we maintain all of the infrastructure. For more information on how we compare to a traditional CMS check out API-based CMS vs Traditional CMS.

How do you compare to Wordpress?

In short, we offer all the same easy-to-use editing capabilities of Wordpress but are significantly easier for developers to setup and maintain. This means you spend less time working on your CMS and more time focusing on things important to your business.

Do you host my templates?

Unlike CMS's you might be used to, we don't control or host any of your templates. The design of your app (HTML + CSS) lives in your application along side the rest of your app. Your application calls our Content API and we return your content in JSON format. You can then render this content in any way you'd like.

Can I import my content?

Yep. To import existing content from another platform, simply send us an email.

What kind of database can I use?


No database required! We're a SaaS CMS or CaaS. You simply call our Content API from your app. We host and maintain all of the CMS infrastructure.

Can I host this?


No, we're a SaaS CMS or CaaS. You simply call our Content API from your app. We host and maintain all of the CMS infrastructure.

I have other questions


We're happy to help.

Chat with us

About Gatsby.js

Gatsby.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

Headless CMS for these technologies and more

Ruby, Rails, Node.js, Python, ASP.NET, Flask, Django, Go, PHP, Laravel, Angular, React, Elixir, Phoenix, Meteor, Vue.js, Heroku, Gatsby.js, Pelican, Next.js

Try Butter free for 30-days

Try ButterCMS in your Gatsby.js app

Get started now

Sign up with Google Sign up with Github
or