This repository has been archived by the owner on Jan 20, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgatsby-config.ts
86 lines (81 loc) · 2.19 KB
/
gatsby-config.ts
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import type { GatsbyConfig } from 'gatsby'
require('dotenv').config({
path: `.env.${process.env.NODE_ENV}`,
})
let accessToken = process.env.CONTENTFUL_DELIVERY_ACCESS_TOKEN
let host
if (process.env.IS_PREVIEW === `true`) {
accessToken = process.env.CONTENTFUL_PREVIEW_ACCESS_TOKEN
host = process.env.CONTENTFUL_PREVIEW_HOST
}
const config: GatsbyConfig = {
trailingSlash: `ignore`,
siteMetadata: {
title: `gatsby`,
siteUrl: `https://www.yourdomain.tld`,
},
flags: {
PARTIAL_HYDRATION: false,
SLICES: false,
},
plugins: [
{
resolve: `gatsby-source-wordpress`,
options: {
url:
process.env.WPGRAPHQL_URL ||
`https://valhallademo.wpengine.com/graphql`,
type: {
MediaItem: {
createFileNodes: false,
},
},
},
},
{
resolve: `gatsby-source-contentful`,
options: {
accessToken,
spaceId: process.env.CONTENTFUL_SPACE_ID,
host,
},
},
// {
// resolve: 'gatsby-source-shopify',
// options: {
// password: process.env.SHOPIFY_SHOP_PASSWORD,
// storeUrl: process.env.GATSBY_SHOPIFY_STORE_URL,
// shopifyConnections: ['collections'],
// },
// },
// {
// resolve: `gatsby-source-drupal`,
// options: {
// baseUrl:
// process.env.DRUPAL_BASEURL ||
// `https://live-contentacms.pantheonsite.io/`,
// apiBase: process.env.DRUPAL_APIBASE || `api`, // optional, defaults to `jsonapi`
// skipFileDownloads: true,
// },
// },
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `Pet Snuggles (Gatsby)`,
short_name: `Pet Snuggles`,
description: `Examples for Valhalla: The Enterprise Content Hub`,
start_url: `/`,
background_color: `#fff`,
// This will impact how browsers show your PWA/website
// https://css-tricks.com/meta-theme-color-and-trickery/
// theme_color: `#6B46C1`,
display: `standalone`,
icon: `src/assets/icon.png`,
},
},
`gatsby-plugin-image`,
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
],
}
export default config