@openstack_dev/gatsby-theme-marketing-oif-core 1.0.38 → 1.0.40
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 +101 -94
- package/package.json +2 -2
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,43 @@ 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
|
+
api: "modern-compiler",
|
|
151
|
+
silenceDeprecations: ["legacy-js-api"]
|
|
152
|
+
}
|
|
153
|
+
}
|
|
147
154
|
},
|
|
148
155
|
{
|
|
149
156
|
// Add font assets before markdown or json files
|
|
150
157
|
resolve: "gatsby-source-filesystem",
|
|
151
158
|
options: {
|
|
152
159
|
path: `${__dirname}/static/fonts`,
|
|
153
|
-
name: "fonts"
|
|
154
|
-
}
|
|
160
|
+
name: "fonts"
|
|
161
|
+
}
|
|
155
162
|
},
|
|
156
163
|
{
|
|
157
164
|
resolve: "gatsby-source-filesystem",
|
|
158
165
|
options: {
|
|
159
166
|
path: `${__dirname}/src/pages`,
|
|
160
|
-
name: "pages"
|
|
161
|
-
}
|
|
167
|
+
name: "pages"
|
|
168
|
+
}
|
|
162
169
|
},
|
|
163
170
|
{
|
|
164
171
|
resolve: "gatsby-source-filesystem",
|
|
165
172
|
options: {
|
|
166
173
|
path: path.resolve(STATIC_CONTENT_DIR_PATH),
|
|
167
|
-
name: "content"
|
|
168
|
-
}
|
|
174
|
+
name: "content"
|
|
175
|
+
}
|
|
169
176
|
},
|
|
170
177
|
{
|
|
171
178
|
resolve: "gatsby-source-filesystem",
|
|
172
179
|
options: {
|
|
173
180
|
path: `${__dirname}/src/data/`,
|
|
174
|
-
name: "data"
|
|
175
|
-
}
|
|
181
|
+
name: "data"
|
|
182
|
+
}
|
|
176
183
|
},
|
|
177
184
|
"gatsby-plugin-image",
|
|
178
185
|
"gatsby-plugin-sharp",
|
|
@@ -188,11 +195,11 @@ const plugins = [
|
|
|
188
195
|
// It"s important to specify the maxWidth (in pixels) of
|
|
189
196
|
// the content container as this plugin uses this as the
|
|
190
197
|
// base for generating different widths of each image.
|
|
191
|
-
maxWidth: 2048
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
]
|
|
195
|
-
}
|
|
198
|
+
maxWidth: 2048
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
}
|
|
196
203
|
},
|
|
197
204
|
{
|
|
198
205
|
resolve: "gatsby-plugin-decap-cms",
|
|
@@ -213,11 +220,11 @@ const plugins = [
|
|
|
213
220
|
...config.resolve,
|
|
214
221
|
fallback: {
|
|
215
222
|
...config.resolve.fallback,
|
|
216
|
-
path: require.resolve("path-browserify")
|
|
217
|
-
}
|
|
223
|
+
path: require.resolve("path-browserify")
|
|
224
|
+
}
|
|
218
225
|
};
|
|
219
|
-
}
|
|
220
|
-
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
221
228
|
},
|
|
222
229
|
...googleTagManagerPlugin,
|
|
223
230
|
...twitterPixelPlugin,
|
|
@@ -230,30 +237,30 @@ const plugins = [
|
|
|
230
237
|
fonts: [
|
|
231
238
|
{
|
|
232
239
|
family: "Open Sans",
|
|
233
|
-
weights: ["300", "400", "700"]
|
|
240
|
+
weights: ["300", "400", "700"]
|
|
234
241
|
},
|
|
235
242
|
{
|
|
236
|
-
family: "Jura:wght@300;400;500;600;700"
|
|
243
|
+
family: "Jura:wght@300;400;500;600;700"
|
|
237
244
|
},
|
|
238
245
|
{
|
|
239
246
|
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
|
-
}
|
|
247
|
+
"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"
|
|
248
|
+
}
|
|
242
249
|
],
|
|
243
|
-
display: "swap"
|
|
244
|
-
}
|
|
250
|
+
display: "swap"
|
|
251
|
+
}
|
|
245
252
|
},
|
|
246
|
-
"gatsby-plugin-netlify"
|
|
253
|
+
"gatsby-plugin-netlify" // make sure to keep it last in the array
|
|
247
254
|
];
|
|
248
255
|
|
|
249
256
|
module.exports = {
|
|
250
257
|
siteMetadata: {
|
|
251
258
|
title,
|
|
252
259
|
description,
|
|
253
|
-
siteUrl
|
|
260
|
+
siteUrl
|
|
254
261
|
},
|
|
255
262
|
plugins,
|
|
256
263
|
flags: {
|
|
257
|
-
DEV_SSR: true
|
|
258
|
-
}
|
|
264
|
+
DEV_SSR: true
|
|
265
|
+
}
|
|
259
266
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openstack_dev/gatsby-theme-marketing-oif-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.40",
|
|
4
4
|
"description": "Base theme for Marketing Sites",
|
|
5
5
|
"author": "smarcet",
|
|
6
6
|
"keywords": [
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"immutable": "^5.1.5",
|
|
95
95
|
"js-cookie": "^3.0.5",
|
|
96
96
|
"js-yaml": "^4.1.0",
|
|
97
|
-
"jsdom": "^
|
|
97
|
+
"jsdom": "^29.0.1",
|
|
98
98
|
"lodash": "^4.17.19",
|
|
99
99
|
"lz-string": "^1.4.4",
|
|
100
100
|
"markdown-it": "^12.0.0",
|