@griddo/cx 1.57.17 → 1.57.18

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.57.17",
4
+ "version": "1.57.18",
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.57.17",
69
+ "@griddo/eslint-config-back": "^1.57.18",
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": "514381d0a46d139e682ccf1393e65f807eeeb21a"
101
+ "gitHead": "375f9926cab02c0c4ece185ef7d5ef00fcb0c4dd"
102
102
  }
@@ -131,7 +131,8 @@ async function renderMultiplePages(page, additionalInfo, createPage) {
131
131
  const { multiPageElements, ...cleanPage } = page;
132
132
 
133
133
  // si no hay un elemento sin slug, como mínimo hay que dibujar una página principal para el conjunto de páginas
134
- if (!multiPageElements.find(({ sectionSlug }) => sectionSlug === '/')) multiPageElements.push({});
134
+ if (!multiPageElements.find(({ sectionSlug }) => sectionSlug === '/'))
135
+ multiPageElements.push({});
135
136
 
136
137
  // crear cada página
137
138
  for (const pageElement of multiPageElements) {
@@ -143,17 +144,18 @@ async function renderMultiplePages(page, additionalInfo, createPage) {
143
144
  metaDescription = '',
144
145
  } = pageElement;
145
146
  const compose = paginatedPage?.fullPath?.compose || '';
146
- const fullUrl = paginatedPage.fullUrl;
147
+ const fullUrl = paginatedPage.fullUrl.endsWith('/')
148
+ ? paginatedPage.fullUrl.slice(0, -1)
149
+ : paginatedPage.fullUrl;
147
150
  const rightSectionSlug = sectionSlug?.replace(/\//g, '');
148
151
  const newCompose = `${compose}${
149
152
  compose.endsWith('/') ? '' : '/'
150
153
  }${rightSectionSlug}`;
151
- paginatedPage.fullUrl = `${fullUrl}${
152
- fullUrl.endsWith('/') ? '' : '/'
153
- }${rightSectionSlug}`;
154
+ paginatedPage.fullUrl = `${fullUrl}/${rightSectionSlug}`;
154
155
  paginatedPage.fullPath.compose = newCompose;
155
156
  paginatedPage.slug = newCompose;
156
157
  paginatedPage.template.activeSectionSlug = sectionSlug;
158
+ paginatedPage.template.activeSectionBase = fullUrl;
157
159
  if (title.trim()) paginatedPage.title = title;
158
160
  if (metaTitle.trim()) paginatedPage.metaTitle = metaTitle;
159
161
  if (metaDescription.trim()) paginatedPage.metaDescription = metaDescription;