forked from kontent-ai/gatsby-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
25 lines (24 loc) · 1009 Bytes
/
gatsby-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require('dotenv').config();
module.exports = {
siteMetadata: {
title: `Gatsby starter site with Kontent.ai`,
},
plugins: [
`gatsby-plugin-netlify`,
// once https://github.com/gatsbyjs/gatsby/discussions/35841 is released replace with embedded API
// currently it is not possible to use GraphQL data there
`gatsby-plugin-react-helmet`,
{
resolve: '@kontent-ai/gatsby-source',
options: {
projectId: process.env.KONTENT_PROJECT_ID, // Fill in your Project ID
// if false used authorization key for secured API
usePreviewUrl: process.env.KONTENT_PREVIEW_ENABLED && process.env.KONTENT_PREVIEW_ENABLED.toLowerCase() === 'true',
authorizationKey: process.env.KONTENT_PREVIEW_ENABLED && process.env.KONTENT_PREVIEW_ENABLED.toLowerCase() === 'true'
? process.env.KONTENT_PREVIEW_KEY
: undefined,
languageCodenames: process.env.KONTENT_LANGUAGE_CODENAMES.split(',').map(lang => lang.trim()),
},
},
]
};