Netlify CMS

 March 22, 2019   3 min read

Netlify CMS

Static + content management = ♥

Netlify CMS is Always the latest GitHub repo pull, with my custom Webpack hashed build. My custom dark build of the Netlify Identity Widget is used on the Gatsby frontend and in my git-gateway back-end.

The below is old content see my new post on Gatsby Netlify No Plugins for CMS and Identity Widget custom builds and no Gatsby Plugins.

CMS index.html File exclusive build

<!doctype html><html lang="en" class="no-js" itemscope itemtype="">
  <script src="./index.js"></script>
  <script src="../../src/components/IdentityWidget/netlify-identity.js"></script>
  if (document.readyState === "loading") {
    document.addEventListener("DOMContentLoaded", function () {
        APIUrl: ""
  } else {
      APIUrl: ""
  <title>Content Manager</title>

<body id="style-3" class="body" auth-false" itemscope itemtype="">
<div class="page">
    // Internal id of the component
    id: "youtube",
    // Visible label
    label: "Youtube",
    // Fields the user need to fill out when adding an instance of the component
    fields: [{name: 'id', label: 'Youtube Video ID', widget: 'string'}],
    // Pattern to identify a block as being an instance of this component
    pattern: /^youtube (\S+)$/,
    // Function to extract data elements from the regexp match
    fromBlock: function(match) {
      return {
        id: match[1]
    // Function to create a text block from an instance of this component
    toBlock: function(obj) {
      return 'youtube ' +;
    // Preview output for this component. Can either be a string or a React component
    // (component gives better render performance)
    toPreview: function(obj) {
      return (
        '<img src="' + + '/maxresdefault.jpg" alt="Youtube Video"/>'
<script charset="utf-8" src="//"></script>
  UPLOADCARE_TABS = "file url facebook gdrive gphotos dropbox instagram evernote flickr skydrive";

  var PostPreview = createClass({
      render: function() {
        var entry = this.props.entry;
        var image = entry.getIn(['data', 'image']);
        var bg = image && this.props.getMedia(image);
        return h('div', {},
          h('div', {className: "hero"},
            h('h1', {}, entry.getIn(['data', 'title'])),
            bg ? h('img', {src: bg.toString()}) : null
          h('p', {},
            h('small', {}, "Written " + entry.getIn(['data', 'date']))
          h('div', {"className": "text"}, this.props.widgetFor('body'))
    CMS.registerPreviewTemplate("posts", PostPreview);

Index.js file for templates and cms-bundled.js

import CMS from '../../src/components/cms/cms'
// Custom build of latest CMS Repo
export default {

Get the speed, security, and scalability of a static site, while still providing a convenient editing interface for content.

An integrated part of your Git workflow Content is stored in your Git repository along side your code for easier versioning, multi-channel publishing, and the option to handle content updates directly in Git.

An extensible CMS built on React

Netlify CMS is built as a single-page React app. Create custom-styled previews, UI widgets, and editor plugins or add backends to support different Git platform APIs. My Netlify CMS backend will build and add Pages, Posts, My layout components with Event data for Bulma GCal fullCalendar localized events, Notifications, Authors, Products, Site Updates and charts data using charts.js displaying build, sales and analytics charts data on individual pages and posts. All edited from a CMS Backend on a Static Website!


Is this a useful post? Please give us a rating!



MailChimp Newsletters


Enjoyed this post? Want the next one in your inbox!

Secure Email


Slack @donboulton

Bring your team together with Slack, Work collaboration hub.

Netlify Functions  Message Me!


Heatmaps by Hotjar

Hotjar is the fast and visual way to understand your users..