@griddo/cx 1.74.19 → 1.74.21
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 +3 -0
- package/gatsby-ssr.js +6 -7
- package/package.json +3 -3
- package/src/components/seo.js +9 -7
package/gatsby-node.js
CHANGED
|
@@ -30,6 +30,7 @@ let updatedSites;
|
|
|
30
30
|
let createdPages = [];
|
|
31
31
|
let buildProcessData = {};
|
|
32
32
|
const componentsVersion = getComponentsVersion();
|
|
33
|
+
|
|
33
34
|
const renderId = process.env.RENDERID || new Date().valueOf();
|
|
34
35
|
|
|
35
36
|
// -----------------------------------------------------------------------------
|
|
@@ -127,6 +128,7 @@ exports.createPages = async ({ actions }) => {
|
|
|
127
128
|
cloudinaryName,
|
|
128
129
|
useMetaTitle,
|
|
129
130
|
showBasicMetaRobots,
|
|
131
|
+
avoidHrefLangsOnCanonicals,
|
|
130
132
|
} = SettingsService.settings;
|
|
131
133
|
|
|
132
134
|
NavService.navigations = {
|
|
@@ -163,6 +165,7 @@ exports.createPages = async ({ actions }) => {
|
|
|
163
165
|
siteOptions: {
|
|
164
166
|
useMetaTitle,
|
|
165
167
|
showBasicMetaRobots,
|
|
168
|
+
avoidHrefLangsOnCanonicals,
|
|
166
169
|
},
|
|
167
170
|
BUILD_MODE,
|
|
168
171
|
siteScript,
|
package/gatsby-ssr.js
CHANGED
|
@@ -12,13 +12,12 @@ export const onRenderBody = props => {
|
|
|
12
12
|
if (ssr.onRenderBody) {
|
|
13
13
|
ssr.onRenderBody(props);
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
];
|
|
20
|
-
|
|
21
|
-
setHeadComponents([...additionalHeadComponents]);
|
|
15
|
+
|
|
16
|
+
// ** Comentado porque ahora mismo no queremos añadir headers adicionales desde aquí,
|
|
17
|
+
// ** los estamos metiendo en SEO.
|
|
18
|
+
// const { setHeadComponents } = props;
|
|
19
|
+
// const additionalHeadComponents = [];
|
|
20
|
+
// if (additionalHeadComponents.length) setHeadComponents([...additionalHeadComponents]);
|
|
22
21
|
};
|
|
23
22
|
|
|
24
23
|
export const onPreRenderHTML = props => {
|
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.74.
|
|
4
|
+
"version": "1.74.21",
|
|
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.74.
|
|
68
|
+
"@griddo/eslint-config-back": "^1.74.21",
|
|
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": "cc181d4fc7d1d622f5819aa2f1dffc5972d33078"
|
|
101
101
|
}
|
package/src/components/seo.js
CHANGED
|
@@ -24,6 +24,7 @@ export default function SEO(props) {
|
|
|
24
24
|
siteOptions: {
|
|
25
25
|
useMetaTitle,
|
|
26
26
|
showBasicMetaRobots,
|
|
27
|
+
avoidHrefLangsOnCanonicals,
|
|
27
28
|
},
|
|
28
29
|
} = props;
|
|
29
30
|
|
|
@@ -70,7 +71,7 @@ export default function SEO(props) {
|
|
|
70
71
|
<link rel="icon" href={faviconResized} />
|
|
71
72
|
|
|
72
73
|
{/* Alternate, solo si se indexa la página y tiene traducciones */}
|
|
73
|
-
{index === 'index' && pageLanguages?.length > 1 &&
|
|
74
|
+
{!(avoidHrefLangsOnCanonicals && canonical) && index === 'index' && pageLanguages?.length > 1 &&
|
|
74
75
|
pageLanguages
|
|
75
76
|
.filter(item => item.isLive)
|
|
76
77
|
.map(item => (
|
|
@@ -104,6 +105,13 @@ export default function SEO(props) {
|
|
|
104
105
|
{/* Lang */}
|
|
105
106
|
<html lang={locale} />
|
|
106
107
|
|
|
108
|
+
{/* Data Layer */}
|
|
109
|
+
{/* Solo cuando se ejecuta en el navegador */}
|
|
110
|
+
<script>{`window.dataLayer = window.dataLayer || [];`}</script>
|
|
111
|
+
{typeof window !== 'undefined' && analyticsDimensions && (
|
|
112
|
+
<script>{`const {__HIDDEN, ...newDataLayer} = ${analyticsDimensions};newDataLayer && window.dataLayer && window.dataLayer.push(newDataLayer);`}</script>
|
|
113
|
+
)}
|
|
114
|
+
|
|
107
115
|
{/* Analytics with UA- */}
|
|
108
116
|
{analyticsSrc && <script src={analyticsSrc}></script>}
|
|
109
117
|
|
|
@@ -113,12 +121,6 @@ export default function SEO(props) {
|
|
|
113
121
|
{analyticsScriptCode}
|
|
114
122
|
</script>
|
|
115
123
|
)}
|
|
116
|
-
|
|
117
|
-
{/* Data Layer */}
|
|
118
|
-
{/* Solo cuando se ejecuta en el navegador */}
|
|
119
|
-
{typeof window !== 'undefined' && analyticsDimensions && (
|
|
120
|
-
<script>{`const {__HIDDEN, ...newDataLayer} = ${analyticsDimensions};newDataLayer && window.dataLayer && window.dataLayer.push(newDataLayer);`}</script>
|
|
121
|
-
)}
|
|
122
124
|
</Helmet>
|
|
123
125
|
</>
|
|
124
126
|
);
|