How to use the tinacms.cms.registerApi function in tinacms

To help you get started, we’ve selected a few tinacms examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tinacms / tinacms / packages / demo-next / pages / _app.js View on Github external
// }

  render() {
    const { Component, pageProps } = this.props
    return (
      
        
      
    )
  }
}

export default MyApp

// Duplicated from gatstby-tinacms-git
cms.registerApi('git', {
  onSubmit(data) {
    return commit(data)
  },
  onChange(data) {
    writeToDisk(data)
  },
  onUploadMedia(data) {
    writeMediaToDisk(data)
  },
  onDelete(data) {
    deleteFromDisk(data)
  },
  isAuthenticated() {
    return true
  },
})

tinacms

[![GitHub license](https://img.shields.io/github/license/tinacms/tinacms?color=blue)](https://github.com/tinacms/tinacms/blob/main/LICENSE) [![npm version](https://img.shields.io/npm/v/tinacms.svg?style=flat)](https://www.npmjs.com/package/tinacms) [![Bui

Apache-2.0
Latest version published 9 days ago

Package Health Score

89 / 100
Full package analysis