@griddo/cx 1.75.49 → 1.75.52

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/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.75.49",
4
+ "version": "1.75.52",
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.75.49",
68
+ "@griddo/eslint-config-back": "^1.75.52",
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": "759d80967ea9a653044c4e1bcfec932337e885b7"
100
+ "gitHead": "1c84b53c8e1cae9fb36916bfe5e26d9a038afa77"
101
101
  }
@@ -32,7 +32,7 @@ export const Head = data => {
32
32
  componentsVersion,
33
33
  griddoVersion,
34
34
  siteScript: siteScriptBulk,
35
- page: { dimensions, fullUrl },
35
+ page: { dimensions, fullUrl, disableHrefLangs },
36
36
  },
37
37
  } = data;
38
38
 
@@ -94,7 +94,8 @@ export const Head = data => {
94
94
  pageMetadata?.canonical !== fullUrl
95
95
  ) &&
96
96
  pageMetadata?.index === 'index' &&
97
- cleanPageLanguages.length > 1;
97
+ cleanPageLanguages.length > 1 &&
98
+ !disableHrefLangs;
98
99
 
99
100
  const currentTime = new Date().toString();
100
101
 
@@ -1,3 +1,5 @@
1
+ const DEFAULT_ITEMS_PER_PAGE_FOR_LIST_TEMPLATES = 25;
2
+
1
3
  const pageUtils = require('./pages.js');
2
4
 
3
5
  const getPagePath = (site, fullPath) => `${site}${fullPath}`;
@@ -23,7 +25,9 @@ const getPageCluster = (itemsPerPage, items) => {
23
25
  const getList = distributorTemplate => {
24
26
  const allItems = distributorTemplate?.queriedItems;
25
27
  // get itemsPerPage from templaet info
26
- const itemsPerPage = distributorTemplate?.itemsPerPage;
28
+ const itemsPerPage =
29
+ distributorTemplate?.itemsPerPage ||
30
+ DEFAULT_ITEMS_PER_PAGE_FOR_LIST_TEMPLATES;
27
31
  // return an array of array pages
28
32
  // [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ]
29
33
  // each array [1, 2, 3] represent a queriedItems
@@ -158,6 +158,7 @@ async function renderListPages(
158
158
  slug: addPageNumberToUrl(rootPage.slug, false),
159
159
  title: addPageNumberToTitle(rootPage.title),
160
160
  metaTitle: addPageNumberToTitle(rootPage.metaTitle),
161
+ disableHrefLangs: pageNumber > 1,
161
162
  template: {
162
163
  ...distributorTemplate,
163
164
  isFirstPage,