@griddo/cx 1.58.2 → 1.58.6
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 +16 -21
- package/package.json +3 -3
- package/src/utils/sites.js +3 -3
package/gatsby-config.js
CHANGED
|
@@ -1,36 +1,31 @@
|
|
|
1
|
+
const computils = require('./src/utils/component-lib-helpers');
|
|
2
|
+
|
|
1
3
|
require('dotenv').config();
|
|
2
4
|
|
|
3
5
|
const assetPrefix = process.env.ASSET_PREFIX || undefined;
|
|
4
6
|
|
|
7
|
+
// Gatsby plugins configuration file from client
|
|
8
|
+
// TODO: Filter the configuration to allow just supported plugins?
|
|
9
|
+
const { plugins } = require(computils.resolveComponentsPath(
|
|
10
|
+
'builder.config.js'
|
|
11
|
+
));
|
|
12
|
+
|
|
5
13
|
const CONFIG = {
|
|
6
14
|
plugins: [
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
15
|
+
// client plugins
|
|
16
|
+
...plugins,
|
|
17
|
+
|
|
18
|
+
// defaults plugins
|
|
19
|
+
'gatsby-plugin-react-svg',
|
|
20
|
+
'gatsby-plugin-react-helmet',
|
|
21
|
+
'gatsby-plugin-no-sourcemaps',
|
|
22
|
+
'gatsby-plugin-catch-links',
|
|
12
23
|
{
|
|
13
24
|
resolve: 'gatsby-plugin-remove-generator',
|
|
14
25
|
options: {
|
|
15
26
|
content: 'Griddo',
|
|
16
27
|
},
|
|
17
28
|
},
|
|
18
|
-
{
|
|
19
|
-
resolve: `gatsby-plugin-polyfill-io`,
|
|
20
|
-
options: {
|
|
21
|
-
features: [
|
|
22
|
-
'Object.entries',
|
|
23
|
-
'Object.fromEntries',
|
|
24
|
-
'Array.prototype.entries',
|
|
25
|
-
'Array.prototype.values',
|
|
26
|
-
'Object.values',
|
|
27
|
-
'Number.isInteger',
|
|
28
|
-
'IntersectionObserver',
|
|
29
|
-
],
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
'gatsby-plugin-react-svg',
|
|
33
|
-
// 'gatsby-plugin-svgr',
|
|
34
29
|
],
|
|
35
30
|
};
|
|
36
31
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@griddo/cx",
|
|
3
3
|
"description": "Griddo SSG based on Gatsby",
|
|
4
|
-
"version": "1.58.
|
|
4
|
+
"version": "1.58.6",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
7
7
|
"Carlos Torres <carlos.torres@secuoyas.com>",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"react-helmet": "^6.0.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@griddo/eslint-config-back": "^1.58.
|
|
69
|
+
"@griddo/eslint-config-back": "^1.58.6",
|
|
70
70
|
"eslint": "^7.5.0",
|
|
71
71
|
"eslint-plugin-node": "^11.1.0",
|
|
72
72
|
"eslint-plugin-react": "7.14.3",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"publishConfig": {
|
|
99
99
|
"access": "public"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "719daeba0b60ffb2be32ddff8f6e046e5564dcd4"
|
|
102
102
|
}
|
package/src/utils/sites.js
CHANGED
|
@@ -121,7 +121,7 @@ const generateSitemaps = async sites => {
|
|
|
121
121
|
const response = await SitesService.getSiteMap(siteID);
|
|
122
122
|
const {
|
|
123
123
|
items: sitemapPagesGroup,
|
|
124
|
-
url:{
|
|
124
|
+
url: {
|
|
125
125
|
home,
|
|
126
126
|
},
|
|
127
127
|
} = response;
|
|
@@ -149,14 +149,14 @@ const generateSitemaps = async sites => {
|
|
|
149
149
|
);
|
|
150
150
|
helpers.log('info', `sitemap exact path ${exactPath}`);
|
|
151
151
|
await saveFile(exactPath, siteMap);
|
|
152
|
-
sitemaps.push(`${home}${sitemapName}`);
|
|
152
|
+
sitemaps.push(`${home.endsWith('/') ? home.slice(0, -1): home}${sitemapName}`);
|
|
153
153
|
}
|
|
154
154
|
if (!sitemaps.length) continue;
|
|
155
155
|
const siteMap = js2xmlparser.parse('sitemapindex', {
|
|
156
156
|
'@': {
|
|
157
157
|
xmlns: 'http://www.sitemaps.org/schemas/sitemap/0.9',
|
|
158
158
|
},
|
|
159
|
-
sitemap: sitemaps.map(loc=>({loc})),
|
|
159
|
+
sitemap: sitemaps.map(loc => ({ loc })),
|
|
160
160
|
});
|
|
161
161
|
const exactPath = path.resolve(
|
|
162
162
|
__dirname,
|