forked from netlify-templates/nextjs-contentful-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstackbit.config.js
29 lines (27 loc) · 1000 Bytes
/
stackbit.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
26
27
28
29
import { ContentfulContentSource } from '@stackbit/cms-contentful';
const config = {
stackbitVersion: '~0.6.0',
ssgName: 'nextjs',
nodeVersion: '18',
contentSources: [
new ContentfulContentSource({
spaceId: process.env.CONTENTFUL_SPACE_ID,
environment: process.env.CONTENTFUL_ENVIRONMENT || 'master',
previewToken: process.env.CONTENTFUL_PREVIEW_TOKEN,
accessToken: process.env.CONTENTFUL_MANAGEMENT_TOKEN,
}),
],
modelExtensions: [{ name: 'page', type: 'page', urlPath: '/{slug}' }],
// Needed only for importing this repository via https://app.stackbit.com/import?mode=duplicate
import: {
type: 'contentful',
contentFile: 'contentful/export.json',
uploadAssets: true,
assetsDirectory: 'contentful',
spaceIdEnvVar: 'CONTENTFUL_SPACE_ID',
deliveryTokenEnvVar: 'CONTENTFUL_DELIVERY_TOKEN',
previewTokenEnvVar: 'CONTENTFUL_PREVIEW_TOKEN',
accessTokenEnvVar: 'CONTENTFUL_MANAGEMENT_TOKEN',
},
};
export default config;