@griddo/cx 1.69.8 → 1.72.0
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-node.js +5 -3
- package/package.json +3 -3
- package/src/components/seo.js +7 -5
- package/src/components/template.js +2 -4
- package/src/utils/helpers.js +12 -8
- package/src/utils/pages.js +2 -4
package/gatsby-node.js
CHANGED
|
@@ -101,6 +101,7 @@ exports.createPages = async ({ actions }) => {
|
|
|
101
101
|
const {
|
|
102
102
|
cloudinaryName,
|
|
103
103
|
useMetaTitle,
|
|
104
|
+
showBasicMetaRobots,
|
|
104
105
|
} = SettingsService.settings;
|
|
105
106
|
|
|
106
107
|
NavService.navigations = {
|
|
@@ -121,7 +122,6 @@ exports.createPages = async ({ actions }) => {
|
|
|
121
122
|
favicon,
|
|
122
123
|
};
|
|
123
124
|
|
|
124
|
-
const showBasicMetaRobots = process.env.showBasicMetaRobots !== 'off';
|
|
125
125
|
const siteScript = siteInfo.siteScript;
|
|
126
126
|
|
|
127
127
|
let additionalInfo = {
|
|
@@ -134,8 +134,10 @@ exports.createPages = async ({ actions }) => {
|
|
|
134
134
|
siteLangs,
|
|
135
135
|
cloudinaryName,
|
|
136
136
|
componentsVersion,
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
siteOptions: {
|
|
138
|
+
useMetaTitle,
|
|
139
|
+
showBasicMetaRobots,
|
|
140
|
+
},
|
|
139
141
|
BUILD_MODE,
|
|
140
142
|
siteScript
|
|
141
143
|
};
|
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.
|
|
4
|
+
"version": "1.72.0",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
7
7
|
"Carlos Torres <carlos.torres@secuoyas.com>",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"react-helmet": "^6.0.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@griddo/eslint-config-back": "^1.
|
|
68
|
+
"@griddo/eslint-config-back": "^1.72.0",
|
|
69
69
|
"eslint": "^7.5.0",
|
|
70
70
|
"eslint-plugin-node": "^11.1.0",
|
|
71
71
|
"eslint-plugin-react": "7.14.3",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"publishConfig": {
|
|
98
98
|
"access": "public"
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "ef3ebfb004be74e3879ed3ca27bc661cfc562433"
|
|
101
101
|
}
|
package/src/components/seo.js
CHANGED
|
@@ -13,20 +13,22 @@ export default function SEO(props) {
|
|
|
13
13
|
title,
|
|
14
14
|
index,
|
|
15
15
|
follow,
|
|
16
|
+
translate,
|
|
16
17
|
metasAdvanced,
|
|
17
18
|
pageLanguages,
|
|
18
19
|
canonical,
|
|
19
|
-
notranslate,
|
|
20
20
|
},
|
|
21
21
|
fullUrl,
|
|
22
|
-
showBasicMetaRobots,
|
|
23
22
|
analyticsDimensions,
|
|
24
23
|
analyticsScript,
|
|
25
|
-
|
|
24
|
+
siteOptions: {
|
|
25
|
+
useMetaTitle,
|
|
26
|
+
showBasicMetaRobots,
|
|
27
|
+
},
|
|
26
28
|
} = props;
|
|
27
29
|
|
|
28
30
|
const metaRobots = cleanCommaSeparated(
|
|
29
|
-
`${index}
|
|
31
|
+
`${index},${follow},${translate},${metasAdvanced}`
|
|
30
32
|
);
|
|
31
33
|
const showMetaRobots =
|
|
32
34
|
showBasicMetaRobots || metaRobots !== 'index,follow,translate';
|
|
@@ -120,4 +122,4 @@ export default function SEO(props) {
|
|
|
120
122
|
</Helmet>
|
|
121
123
|
</>
|
|
122
124
|
);
|
|
123
|
-
}
|
|
125
|
+
}
|
|
@@ -22,10 +22,9 @@ export default data => {
|
|
|
22
22
|
footer,
|
|
23
23
|
siteMetadata,
|
|
24
24
|
componentsVersion,
|
|
25
|
-
showBasicMetaRobots,
|
|
26
25
|
theme,
|
|
27
26
|
cloudinaryName,
|
|
28
|
-
|
|
27
|
+
siteOptions,
|
|
29
28
|
socials,
|
|
30
29
|
siteLangs,
|
|
31
30
|
BUILD_MODE,
|
|
@@ -75,10 +74,9 @@ export default data => {
|
|
|
75
74
|
fullPath={content.fullPath}
|
|
76
75
|
fullUrl={content.fullUrl}
|
|
77
76
|
componentsVersion={componentsVersion}
|
|
78
|
-
showBasicMetaRobots={showBasicMetaRobots}
|
|
79
77
|
analyticsDimensions={analyticsDimensions}
|
|
80
78
|
analyticsScript={analyticsScript}
|
|
81
|
-
|
|
79
|
+
siteOptions={siteOptions}
|
|
82
80
|
/>
|
|
83
81
|
<RenderGriddoPage
|
|
84
82
|
content={content}
|
package/src/utils/helpers.js
CHANGED
|
@@ -9,8 +9,7 @@ const log = (state, message, data) => {
|
|
|
9
9
|
LOGS !== false &&
|
|
10
10
|
state !== 'error' &&
|
|
11
11
|
console.log(
|
|
12
|
-
`${chalk[color[state]](msg[state])} ${message} ${
|
|
13
|
-
data ? JSON.stringify(data, null, 2) : ''
|
|
12
|
+
`${chalk[color[state]](msg[state])} ${message} ${data ? JSON.stringify(data, null, 2) : ''
|
|
14
13
|
}`
|
|
15
14
|
);
|
|
16
15
|
};
|
|
@@ -24,7 +23,7 @@ const addCloudinaryParams = (socialImage, params) => {
|
|
|
24
23
|
return `https://${head}/${params}${fullId}`;
|
|
25
24
|
};
|
|
26
25
|
|
|
27
|
-
const getPageMetaData = params
|
|
26
|
+
const getPageMetaData = params => {
|
|
28
27
|
const {
|
|
29
28
|
title,
|
|
30
29
|
metaTitle,
|
|
@@ -37,9 +36,14 @@ const getPageMetaData = params => {
|
|
|
37
36
|
metasAdvanced,
|
|
38
37
|
pageLanguages,
|
|
39
38
|
fullUrl,
|
|
40
|
-
noTranslate,
|
|
41
39
|
} = params;
|
|
42
40
|
|
|
41
|
+
const metasAdvancedList = metasAdvanced
|
|
42
|
+
?.split(',')
|
|
43
|
+
.filter(item => !!item)
|
|
44
|
+
.map(item => item.trim().toLowerCase())
|
|
45
|
+
|| [];
|
|
46
|
+
|
|
43
47
|
return {
|
|
44
48
|
title: metaTitle || title,
|
|
45
49
|
description: metaDescription,
|
|
@@ -47,14 +51,14 @@ const getPageMetaData = params => {
|
|
|
47
51
|
canonicalURL && canonicalURL !== fullUrl
|
|
48
52
|
? canonicalURL
|
|
49
53
|
: isIndexed
|
|
50
|
-
|
|
51
|
-
|
|
54
|
+
? fullUrl
|
|
55
|
+
: null,
|
|
52
56
|
locale,
|
|
53
57
|
url,
|
|
54
58
|
index: isIndexed ? 'index' : 'noindex',
|
|
55
59
|
follow: follow ? 'follow' : 'nofollow',
|
|
56
|
-
|
|
57
|
-
metasAdvanced,
|
|
60
|
+
translate: metasAdvancedList.includes('notranslate') ? 'notranslate' : 'translate',
|
|
61
|
+
metasAdvanced: metasAdvancedList.filter(item => item !== 'notranslate').join(),
|
|
58
62
|
pageLanguages,
|
|
59
63
|
};
|
|
60
64
|
};
|
package/src/utils/pages.js
CHANGED
|
@@ -23,9 +23,8 @@ async function renderSinglePage(page, additionalInfo, createPage) {
|
|
|
23
23
|
siteLangs,
|
|
24
24
|
navigations: { header, footer },
|
|
25
25
|
cloudinaryName,
|
|
26
|
-
|
|
26
|
+
siteOptions,
|
|
27
27
|
componentsVersion,
|
|
28
|
-
showBasicMetaRobots,
|
|
29
28
|
BUILD_MODE,
|
|
30
29
|
sitePages,
|
|
31
30
|
siteScript,
|
|
@@ -72,10 +71,9 @@ async function renderSinglePage(page, additionalInfo, createPage) {
|
|
|
72
71
|
socials,
|
|
73
72
|
siteLangs,
|
|
74
73
|
cloudinaryName,
|
|
75
|
-
|
|
74
|
+
siteOptions,
|
|
76
75
|
BUILD_MODE,
|
|
77
76
|
componentsVersion,
|
|
78
|
-
showBasicMetaRobots,
|
|
79
77
|
sitePages,
|
|
80
78
|
siteScript,
|
|
81
79
|
|