How to run Gatsby preview feature with Kentico Kontent - makma/gatsby-starter-kontent GitHub Wiki
- Fork gatsby-starter-kontent repository and switch to "preview-functionality" branch.
- Create a new project in https://app.kontent.ai/.
- Go to Kontent Template Manager and import our sample project
479c94ca-8760-00f5-6b07-15d19b791204
into your project. This project contains a registered Gatsby preview functionality onSpeaking engagement
content type. - Get projectId and preview Delviery API key of this project and us it in gatsby-config.js in
deliveryClientConfig
section in format like:
deliveryClientConfig: {
projectId: '<Project Id>',
globalQueryConfig: {
usePreviewMode: true,
},
previewApiKey: '<Preview Api Key>',
typeResolvers: []
},
-
Go to https://www.gatsbyjs.com/dashboard/sites, create a new site, click I already have a Gatsby site, Add a new organization - select your organization and newly created repository, switch to
preview-functionality
branch, Install Gatsby Cloud, copy POST endpoint URL and save changes. Create site. -
Go to Kontent to your project to Content Types > Speaking engagement and edit Gatsby preview custom element. Use your preview API key and copied gatsby webhook URL. Save changes.