@griddo/cx 1.74.20 → 1.74.22

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 CHANGED
@@ -128,6 +128,7 @@ exports.createPages = async ({ actions }) => {
128
128
  cloudinaryName,
129
129
  useMetaTitle,
130
130
  showBasicMetaRobots,
131
+ avoidHrefLangsOnCanonicals,
131
132
  } = SettingsService.settings;
132
133
 
133
134
  NavService.navigations = {
@@ -164,6 +165,7 @@ exports.createPages = async ({ actions }) => {
164
165
  siteOptions: {
165
166
  useMetaTitle,
166
167
  showBasicMetaRobots,
168
+ avoidHrefLangsOnCanonicals,
167
169
  },
168
170
  BUILD_MODE,
169
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
- const { setHeadComponents } = props;
16
-
17
- const additionalHeadComponents = [
18
- <script>window.dataLayer = window.dataLayer || [];</script>,
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.20",
4
+ "version": "1.74.22",
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.20",
68
+ "@griddo/eslint-config-back": "^1.74.22",
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": "f3f8927174aa35a0cfb99b25a096efd3065a7442"
100
+ "gitHead": "c20fbf4793cacb017e4486e1d9bc4d253c063e0c"
101
101
  }
@@ -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 => (
@@ -106,10 +107,11 @@ export default function SEO(props) {
106
107
 
107
108
  {/* Data Layer */}
108
109
  {/* Solo cuando se ejecuta en el navegador */}
110
+ <script>{`window.dataLayer = window.dataLayer || [];`}</script>
109
111
  {typeof window !== 'undefined' && analyticsDimensions && (
110
112
  <script>{`const {__HIDDEN, ...newDataLayer} = ${analyticsDimensions};newDataLayer && window.dataLayer && window.dataLayer.push(newDataLayer);`}</script>
111
113
  )}
112
-
114
+
113
115
  {/* Analytics with UA- */}
114
116
  {analyticsSrc && <script src={analyticsSrc}></script>}
115
117