@openstack_dev/gatsby-theme-marketing-oif-core 1.0.38 → 1.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/gatsby-config.js +100 -94
- package/package.json +1 -1
package/gatsby-config.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
const path = require("path");
|
|
2
2
|
|
|
3
3
|
require("dotenv").config({
|
|
4
|
-
path: `.env.${process.env.NODE_ENV}
|
|
4
|
+
path: `.env.${process.env.NODE_ENV}`
|
|
5
5
|
});
|
|
6
6
|
|
|
7
7
|
const {
|
|
8
8
|
STATIC_CONTENT_DIR_PATH,
|
|
9
9
|
SITE_SETTINGS_FILE_PATH,
|
|
10
|
-
SITE_SETTINGS_DIR_PATH
|
|
10
|
+
SITE_SETTINGS_DIR_PATH
|
|
11
11
|
} = require("./src/utils/filePath");
|
|
12
12
|
|
|
13
13
|
let siteSettings = require(`./${SITE_SETTINGS_FILE_PATH}`);
|
|
@@ -17,98 +17,101 @@ try {
|
|
|
17
17
|
console.log("Falling back to default site settings.");
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
const title =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
const title =
|
|
21
|
+
siteSettings?.siteMetadata?.title || process.env.GATSBY_METADATA_TITLE;
|
|
22
|
+
const description =
|
|
23
|
+
siteSettings?.siteMetadata?.description ||
|
|
24
|
+
process.env.GATSBY_METADATA_DESCRIPTION;
|
|
25
|
+
const siteUrl =
|
|
26
|
+
siteSettings?.siteMetadata?.siteUrl || process.env.GATSBY_METADATA_SITE_URL;
|
|
24
27
|
|
|
25
28
|
const faviconAsset = siteSettings?.favicon?.asset;
|
|
26
29
|
|
|
27
30
|
const manifestPlugin = faviconAsset
|
|
28
31
|
? [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
{
|
|
33
|
+
resolve: "gatsby-plugin-manifest",
|
|
34
|
+
options: {
|
|
35
|
+
name: title,
|
|
36
|
+
short_name: title,
|
|
37
|
+
description,
|
|
38
|
+
start_url: "/",
|
|
39
|
+
display: "minimal-ui",
|
|
40
|
+
icon: path.join(SITE_SETTINGS_DIR_PATH, faviconAsset),
|
|
41
|
+
include_favicon: true
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
]
|
|
42
45
|
: [];
|
|
43
46
|
|
|
44
47
|
const googleTagManagerPlugin = process.env.GOOGLE_TAGMANAGER_ID
|
|
45
48
|
? [
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
{
|
|
50
|
+
resolve: "gatsby-plugin-google-tagmanager",
|
|
51
|
+
options: {
|
|
52
|
+
id: process.env.GOOGLE_TAGMANAGER_ID,
|
|
53
|
+
includeInDevelopment: false,
|
|
54
|
+
defaultDataLayer: { platform: "gatsby" }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
]
|
|
55
58
|
: [];
|
|
56
59
|
|
|
57
60
|
const twitterPixelPlugin = process.env.TWITTER_PIXEL_ID
|
|
58
61
|
? [
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
{
|
|
63
|
+
resolve: "gatsby-plugin-twitter-pixel",
|
|
64
|
+
options: {
|
|
65
|
+
pixelId: process.env.TWITTER_PIXEL_ID
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
]
|
|
66
69
|
: [];
|
|
67
70
|
|
|
68
71
|
const linkedInInsightPlugin = process.env.LINKEDIN_INSIGHT_PARTNER_ID
|
|
69
72
|
? [
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
{
|
|
74
|
+
resolve: require.resolve("./plugins/gatsby-plugin-linkedin-insight"),
|
|
75
|
+
options: {
|
|
76
|
+
partnerId: process.env.LINKEDIN_INSIGHT_PARTNER_ID,
|
|
77
|
+
includeInDevelopment: false
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
]
|
|
78
81
|
: [];
|
|
79
82
|
|
|
80
83
|
const quantcastTagPlugin = process.env.QUANTCAST_TAG_ACCOUNT_ID
|
|
81
84
|
? [
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
{
|
|
86
|
+
resolve: "gatsby-plugin-quantcast-tag",
|
|
87
|
+
options: {
|
|
88
|
+
acccountId: process.env.QUANTCAST_TAG_ACCOUNT_ID,
|
|
89
|
+
head: false
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
]
|
|
90
93
|
: [];
|
|
91
94
|
|
|
92
95
|
const cookiebotPlugin = process.env.COOKIEBOT_ID
|
|
93
96
|
? [
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
{
|
|
98
|
+
resolve: "gatsby-plugin-cookiebot",
|
|
99
|
+
options: {
|
|
100
|
+
cookiebotId: process.env.COOKIEBOT_ID
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
]
|
|
101
104
|
: [];
|
|
102
105
|
|
|
103
106
|
const plugins = [
|
|
104
107
|
{
|
|
105
108
|
resolve: require.resolve("./plugins/gatsby-plugin-mui-theme-provider"),
|
|
106
109
|
options: {
|
|
107
|
-
themePath: `${__dirname}/src/theme.js
|
|
108
|
-
}
|
|
110
|
+
themePath: `${__dirname}/src/theme.js`
|
|
111
|
+
}
|
|
109
112
|
},
|
|
110
113
|
{
|
|
111
|
-
resolve: require.resolve("./plugins/gatsby-plugin-emotion-cache-provider")
|
|
114
|
+
resolve: require.resolve("./plugins/gatsby-plugin-emotion-cache-provider")
|
|
112
115
|
},
|
|
113
116
|
...manifestPlugin,
|
|
114
117
|
{
|
|
@@ -117,9 +120,9 @@ const plugins = [
|
|
|
117
120
|
aliases: {
|
|
118
121
|
"@utils": `${__dirname}/src/utils`,
|
|
119
122
|
"@cms": `${__dirname}/src/cms`,
|
|
120
|
-
"@content": `${__dirname}/src/content
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
+
"@content": `${__dirname}/src/content`
|
|
124
|
+
}
|
|
125
|
+
}
|
|
123
126
|
},
|
|
124
127
|
{
|
|
125
128
|
/**
|
|
@@ -140,39 +143,42 @@ const plugins = [
|
|
|
140
143
|
cssLoaderOptions: {
|
|
141
144
|
esModule: false,
|
|
142
145
|
modules: {
|
|
143
|
-
namedExport: false
|
|
144
|
-
}
|
|
146
|
+
namedExport: false
|
|
147
|
+
}
|
|
145
148
|
},
|
|
146
|
-
|
|
149
|
+
sassOptions: {
|
|
150
|
+
silenceDeprecations: ["legacy-js-api"]
|
|
151
|
+
}
|
|
152
|
+
}
|
|
147
153
|
},
|
|
148
154
|
{
|
|
149
155
|
// Add font assets before markdown or json files
|
|
150
156
|
resolve: "gatsby-source-filesystem",
|
|
151
157
|
options: {
|
|
152
158
|
path: `${__dirname}/static/fonts`,
|
|
153
|
-
name: "fonts"
|
|
154
|
-
}
|
|
159
|
+
name: "fonts"
|
|
160
|
+
}
|
|
155
161
|
},
|
|
156
162
|
{
|
|
157
163
|
resolve: "gatsby-source-filesystem",
|
|
158
164
|
options: {
|
|
159
165
|
path: `${__dirname}/src/pages`,
|
|
160
|
-
name: "pages"
|
|
161
|
-
}
|
|
166
|
+
name: "pages"
|
|
167
|
+
}
|
|
162
168
|
},
|
|
163
169
|
{
|
|
164
170
|
resolve: "gatsby-source-filesystem",
|
|
165
171
|
options: {
|
|
166
172
|
path: path.resolve(STATIC_CONTENT_DIR_PATH),
|
|
167
|
-
name: "content"
|
|
168
|
-
}
|
|
173
|
+
name: "content"
|
|
174
|
+
}
|
|
169
175
|
},
|
|
170
176
|
{
|
|
171
177
|
resolve: "gatsby-source-filesystem",
|
|
172
178
|
options: {
|
|
173
179
|
path: `${__dirname}/src/data/`,
|
|
174
|
-
name: "data"
|
|
175
|
-
}
|
|
180
|
+
name: "data"
|
|
181
|
+
}
|
|
176
182
|
},
|
|
177
183
|
"gatsby-plugin-image",
|
|
178
184
|
"gatsby-plugin-sharp",
|
|
@@ -188,11 +194,11 @@ const plugins = [
|
|
|
188
194
|
// It"s important to specify the maxWidth (in pixels) of
|
|
189
195
|
// the content container as this plugin uses this as the
|
|
190
196
|
// base for generating different widths of each image.
|
|
191
|
-
maxWidth: 2048
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
]
|
|
195
|
-
}
|
|
197
|
+
maxWidth: 2048
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
]
|
|
201
|
+
}
|
|
196
202
|
},
|
|
197
203
|
{
|
|
198
204
|
resolve: "gatsby-plugin-decap-cms",
|
|
@@ -213,11 +219,11 @@ const plugins = [
|
|
|
213
219
|
...config.resolve,
|
|
214
220
|
fallback: {
|
|
215
221
|
...config.resolve.fallback,
|
|
216
|
-
path: require.resolve("path-browserify")
|
|
217
|
-
}
|
|
222
|
+
path: require.resolve("path-browserify")
|
|
223
|
+
}
|
|
218
224
|
};
|
|
219
|
-
}
|
|
220
|
-
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
221
227
|
},
|
|
222
228
|
...googleTagManagerPlugin,
|
|
223
229
|
...twitterPixelPlugin,
|
|
@@ -230,30 +236,30 @@ const plugins = [
|
|
|
230
236
|
fonts: [
|
|
231
237
|
{
|
|
232
238
|
family: "Open Sans",
|
|
233
|
-
weights: ["300", "400", "700"]
|
|
239
|
+
weights: ["300", "400", "700"]
|
|
234
240
|
},
|
|
235
241
|
{
|
|
236
|
-
family: "Jura:wght@300;400;500;600;700"
|
|
242
|
+
family: "Jura:wght@300;400;500;600;700"
|
|
237
243
|
},
|
|
238
244
|
{
|
|
239
245
|
family:
|
|
240
|
-
"Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900"
|
|
241
|
-
}
|
|
246
|
+
"Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900"
|
|
247
|
+
}
|
|
242
248
|
],
|
|
243
|
-
display: "swap"
|
|
244
|
-
}
|
|
249
|
+
display: "swap"
|
|
250
|
+
}
|
|
245
251
|
},
|
|
246
|
-
"gatsby-plugin-netlify"
|
|
252
|
+
"gatsby-plugin-netlify" // make sure to keep it last in the array
|
|
247
253
|
];
|
|
248
254
|
|
|
249
255
|
module.exports = {
|
|
250
256
|
siteMetadata: {
|
|
251
257
|
title,
|
|
252
258
|
description,
|
|
253
|
-
siteUrl
|
|
259
|
+
siteUrl
|
|
254
260
|
},
|
|
255
261
|
plugins,
|
|
256
262
|
flags: {
|
|
257
|
-
DEV_SSR: true
|
|
258
|
-
}
|
|
263
|
+
DEV_SSR: true
|
|
264
|
+
}
|
|
259
265
|
};
|