Hi all, as many of you we have also fallen prey to the preview issues when moving from Gatsby Cloud to Netlify.
In order to quickly get something up-and-running we would like to build a branch of our codebase, with a slightly modified gastby-source-datocms plugin config:
{
resolve: "gatsby-source-datocms",
options: {
apiToken: process.env.DATO_API_TOKEN,
environment: process.env.DATO_ENVIRONMENT,
previewMode: true,
disableLiveReload: false,
},
},
We were hoping that this way we would be able to retrieve draft content from DatoCMS, but this does not seem to be the case?
Are we doing something wrong, or does previewMode: true
not work like we interpreted it to work?
We based us on the following documentation: gatsby-source-datocms | Gatsby
// If you are working on development/staging environment, you might want to // preview the latest version of records instead of the published one: previewMode: false,