React Logo

React Blog Engine

You've got better things to do than build another blog

Add Butter to your React app and get back to more interesting problems

Try ButterCMS free

ButterCMS is an API-based React blog engine that integrates seamlessly with new and existing React apps. Add ButterCMS to your React app in minutes using our Node.js API client. Use ButterCMS with React to enable dynamic content in your apps for blogs, pages, and more.

Above is quick video of integrating Butter's blog engine into an application.

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

Daniel, Founder of Collective Idea

All your requirements, solved

  • ButterCMS Feature Image Use main domain (for SEO)
  • ButterCMS Feature Image Friendly admin interface
  • ButterCMS Feature Image Upload images and media
  • ButterCMS Feature Image Edit slugs and meta tags
  • ButterCMS Feature Image Tag and categorize posts
  • ButterCMS Feature Image RSS/Atom Feeds
  • ButterCMS Feature Image Search
  • ButterCMS Feature Image Webhooks

Powerful admin interface

Integrates with React

Our blog engine has a simple API and drop-in React SDK.

Save development time

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

Gives you great SEO

Host your blog on your main domain and customize slugs and meta tags.

Try ButterCMS in your React app

Setup in minutes

Official React Guide



Integrating Butter into your React 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 React Guide

To display posts we create a few routes (using react-router) and Reacet components that fetch blog posts from the Butter API. See our API reference for additional options such as filtering by category or author. The response also includes some metadata we'll use for pagination.

routes.jsx:

import React from 'react';
import { Router, IndexRoute, Route } from 'react-router';

import App from './App';
import BlogHome from './BlogHome';
import BlogPost from './BlogPost';

const Routes = (props) => (
  <Router {...props}>
    <Route path="/blog" component={App}>
      <IndexRoute component={BlogHome} />
      <Route path="/p/:page" component={BlogHome} />
      <Route path="/post/:slug" component={BlogPost} />
    </Route>
  </Router>
);

export default Routes;

BlogHome.js:

import React, { Component } from 'react';
import { Link } from 'react-router'
import Butter from 'buttercms'

const butter = Butter('');

class BlogHome extends Component {

  constructor(props) {
    super(props);

    this.state = {
      loaded: false
    };
  }

  fetchPosts(page) {
    butter.post.list({page: page, page_size: 10}).then((resp) => {
      this.setState({
        loaded: true,
        resp: resp.data
      })
    });
  }

  componentWillMount() {
    let page = this.props.params.page || 1;

    this.fetchPosts(page)
  }

  componentWillReceiveProps(nextProps) {
    this.setState({loaded: false});

    let page = nextProps.params.page || 1;

    this.fetchPosts(page)
  }

  render() {
    if (this.state.loaded) {
      const { next_page, previous_page } = this.state.resp.meta;

      return (
        <div>
          {this.state.resp.data.map((post) => {
            return (
              <div key={post.slug}>
                <Link to={`/post/${post.slug}`}>{post.title}</Link>
              </div>
            )
          })}

          <br />

          <div>
            {previous_page && <Link to={`/p/${previous_page}`}>Prev</Link>}

            {next_page && <Link to={`/p/${next_page}`}>Next</Link>}
          </div>
        </div>
      );
    } else {
      return (
        <div>
          Loading...
        </div>
      )
    }
  }
}

export default BlogHome;

Our BlogPost.js compnent for displaying a full post includes information such as author and publish date. See a full list of available post properties in our API reference. We use react-helmet to set HTML title and meta tags for SEO.

import React, { Component } from 'react';
import Butter from 'buttercms'
import { Helmet } from "react-helmet";

const butter = Butter('');

class BlogPost extends Component {

  constructor(props) {
    super(props);

    this.state = {
      loaded: false
    };
  }

  componentWillMount() {
    let slug = this.props.params.slug;

    butter.post.retrieve(slug).then((resp) => {
      this.setState({
        loaded: true,
        post: resp.data.data
      })
    });
  }

  render() {
    if (this.state.loaded) {
      const post = this.state.post;

      return (
        <div>
          <Helmet>
            <title>{post.seo_title}</title>
            <meta name="description" content={post.meta_description} />
            <meta name="og:image" content={post.featured_image} />
          </Helmet>

          <h1>{post.title}</h1>
          <div dangerouslySetInnerHTML={{__html: post.body}} />
        </div>
      );
    } else {
      return (
        <div>
          Loading...
        </div>
      );
    }
  }
}

export default BlogPost;
Try ButterCMS in your React 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.

Learn more about how we're a wordpress alternative.

What's my blog going to look like?

Unlike CMS's you might be used to, we don't control or host any of your templates. The design of your blog (HTML + CSS) lives in your application along side the rest of your app. Your application calls our Blog Engine API to get the raw blog post content and then injects it into your own templates during rendering. This has many benefits including blog your instantly matching the rest of your site branding giving it a unique feel; not the cookie-cutter blog themes you'll experience with other CMS's.

Can I import my existing blog content?

Yep. To import 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 React

React is a declarative, efficient, and flexible JavaScript library for building user interfaces.

Blog Engine for these technologies and more

Ruby, Rails, Node.js, Python, ASP.NET, C#, Flask, Django, Go, PHP, React, Phoenix, Elixir, Angular, Vue.js

Try Butter free for 30-days

Try ButterCMS in your React app

Get started now

Sign up with Google Sign up with Github
or