- Install dependencies :
gatsby-source-storyblok
,storyblok-react
,react
,gatsby
- Add Storyblok accessToken in your
gatsby-config.js
{
resolve: 'gatsby-source-storyblok',
options: {
homeSlug: 'home',
version: process.env.BUILD_ENV === 'production' ? 'published' : 'draft',
accessToken: process.env.BUILD_ENV === 'production'? '000000' : '000000'
}
},
N.b ReplaceImageUrlBySharpObj will only replace images that are in a field and not into a markdown space. For that, just create another function for that purpose.