gatsby-core-theme 30.0.74 → 30.0.75

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [30.0.75](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v30.0.74...v30.0.75) (2024-02-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * update hreflangs ([ecdbf24](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/ecdbf24ac07cb3f4d25f3e60f8136ddd7184b31f))
7
+
1
8
  ## [30.0.74](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v30.0.73...v30.0.74) (2024-02-07)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "30.0.74",
3
+ "version": "30.0.75",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "author": "",
6
6
  "license": "ISC",
@@ -474,7 +474,8 @@ export default {
474
474
  Object.keys(transformedPages[market]).forEach((pageType) => {
475
475
  transformedPages[market][pageType].forEach((page, index) => {
476
476
  // Href Lang
477
- let hreflangs = page.page_group_id ? data.page_groups[page.page_group_id] : null;
477
+ // Href Lang
478
+ let hreflangs = page.page_group_id ? cloneDeep(data.page_groups[page.page_group_id]) : null;
478
479
  if (page.page_custom_hreflangs) {
479
480
  hreflangs = hreflangs
480
481
  ? [...hreflangs, ...page.page_custom_hreflangs]
@@ -484,16 +485,13 @@ export default {
484
485
  hreflangs &&
485
486
  hreflangs.forEach((href, i) => {
486
487
  if (
487
- pagesMappedById[href.page_id] &&
488
- pagesMappedById[href.page_id].path &&
489
- !data.site_markets[pagesMappedById[href.page_id].market].path_prefix
488
+ data.site_markets[`${href.country}_${href.language}`] &&
489
+ !data.site_markets[`${href.country}_${href.language}`].path_prefix
490
490
  ) {
491
491
  hreflangs[i].default = true;
492
492
  }
493
493
 
494
- const pagePathPrefix =
495
- pagesMappedById[href.page_id] &&
496
- data.site_markets[pagesMappedById[href.page_id].market].path_prefix;
494
+ const pagePathPrefix = data.site_markets[`${href.country}_${href.language}`] && data.site_markets[`${href.country}_${href.language}`].path_prefix;
497
495
 
498
496
  if (pagePathPrefix) {
499
497
  hreflangs[i].path = `${pagePathPrefix}${