Custom Git Provider
Implement a Git Provider is easy. It is a class or object that implements the GitProvider interface.
GitProvider Interface
onโPut
REQUIRED
(key: string, value: string) => Promise<void>
This is used to save content to Git. It is called whenever a value is saved in the CMS.
onโDelete
REQUIRED
(key: string) => Promise<void>
This is used to delete content from Git. It is called whenever a value is deleted in the CMS.
All properties marked as REQUIRED must be specified for the field to work properly.
Example
Here is the source code for the GitHub Git Provider. It is a good example of how to implement the GitProvider interface.
Adding your Git Provider
This can now be used as a prop to the createDatabase function.
database.ts,js: