-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgatsby-config.js
87 lines (84 loc) · 2.59 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
const activeEnv =
process.env.GATSBY_ACTIVE_ENV || process.env.NODE_ENV || `development`
const config = {
wordPressUrl:
activeEnv === "production"
? `REPLACE_SHIFTER_URL/`
: `https://127.0.0.1:8443/`,
wordPressGraphQlUrl:
activeEnv === "production"
? `REPLACE_SHIFTER_URL/graphql/`
: `https://127.0.0.1:8443/graphql/`,
}
module.exports = { config }
module.exports = {
siteMetadata: {
title: `Shifter + Gatsby + GitHub Actions`,
description: `Example site using Shifter, WordPress, WPGraphQL, Gatsby, Netlify, and GitHub Actions.`,
author: `@getshifter`,
wordPressUrl: config.wordPressUrl,
wordPressGraphQlUrl: config.wordPressGraphQlUrl,
},
plugins: [
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images`,
},
},
{
resolve: `gatsby-plugin-less`,
options: {
javascriptEnabled: true,
modifyVars: {
"layout-header-background": `#0e2339`,
"primary-color": `#1890ff`,
"link-color": `#1890ff`,
"success-color": `#52c41a`,
"warning-color": `#faad14`,
"error-color": `#f5222d`,
"font-size-base": `16px`,
"heading-color": `rgba(0, 0, 0, .85)`,
"text-color": `rgba(0, 0, 0, .65)`,
"text-color-secondary": `rgba(0, 0, 0, .45)`,
"disabled-color": `rgba(0, 0, 0, .25)`,
"border-radius-base": `4px`,
"border-color-base": `#d9d9d9`,
"box-shadow-base": `0 2px 8px rgba(0, 0, 0, .15)`,
},
},
},
{
resolve: `gatsby-plugin-antd`,
},
{
resolve: `gatsby-source-graphql`,
options: {
typeName: `WPGraphQL`,
fieldName: `wpgraphql`,
// url: process.env.SHIFTER_APP_URL + `/graphql/`,
// url: `https://63239777-0e4c-473c-a1c7-73498363fcf9.app.getshifter.io:23736/graphql/`,
url: config.wordPressGraphQlUrl,
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `gatsby-starter-default`,
short_name: `starter`,
start_url: `/`,
background_color: `#f80759`,
theme_color: `#f80759`,
display: `minimal-ui`,
icon: `src/images/shifter-icon.png`, // This path is relative to the root of the site.
},
},
// this (optional) plugin enables Progressive Web App + Offline functionality
// To learn more, visit: https://gatsby.dev/offline
// `gatsby-plugin-offline`,
],
}