-
Notifications
You must be signed in to change notification settings - Fork 19
/
gatsby-config.js
64 lines (63 loc) · 1.94 KB
/
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/* eslint-disable import/no-extraneous-dependencies */
require('dotenv').config({
path: `.env.${process.env.NODE_ENV}`,
});
module.exports = {
siteMetadata: {
title: 'Gatsby Contentstack starter',
},
plugins: [
'gatsby-plugin-react-helmet',
`gatsby-plugin-image`,
`gatsby-plugin-sharp`,
`gatsby-transformer-sharp`,
{
resolve: 'gatsby-plugin-eslint',
options: {
test: /\.js$|\.jsx$/,
exclude: /(node_modules|.cache|public)/,
stages: ['develop'],
options: {
emitWarning: true,
failOnError: false,
},
},
},
{
resolve: 'gatsby-plugin-manifest',
options: {
name: 'gatsby-starter-contentstack',
short_name: 'starter',
start_url: '/',
background_color: '#663399',
theme_color: '#663399',
display: 'minimal-ui',
icon: 'src/images/contentstack-logo.png', // This path is relative to the root of the site.
},
},
// {
// resolve: 'gatsby-source-filesystem',
// options: {
// path: `${__dirname}/src/`,
// },
// },
// `gatsby-plugin-sharp`, `gatsby-transformer-sharp`,
{
resolve: 'gatsby-source-contentstack',
options: {
api_key: process.env.CONTENTSTACK_API_KEY,
delivery_token: process.env.CONTENTSTACK_DELIVERY_TOKEN,
environment: process.env.CONTENTSTACK_ENVIRONMENT,
cdn: process.env.CONTENTSTACK_CDN ? process.env.CONTENTSTACK_CDN : '',
// Optional: expediteBuild set this to either true or false
expediteBuild: true,
// Optional: Specify true if you want to generate custom schema
enableSchemaGeneration: true,
// Optional: Specify a different prefix for types.
// This is useful in cases where you have multiple instances
// of the plugin to be connected to different stacks.
type_prefix: 'Contentstack', // (default)
},
},
],
};