gatsby-core-theme 44.4.56 → 44.4.57

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
+ ## [44.4.57](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.56...v44.4.57) (2025-09-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * added option to include toplist in schema ([f335572](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/f3355722385dc2c9cc27de4f5b4ddf9b3728bc36))
7
+
1
8
  ## [44.4.56](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.55...v44.4.56) (2025-09-10)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "44.4.56",
3
+ "version": "44.4.57",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "author": "",
6
6
  "license": "ISC",
@@ -2,4 +2,5 @@
2
2
  export const SchemaConstant = {
3
3
  operatorHeaderWidth: "",
4
4
  operatorHeaderHeight: "",
5
+ includeToplistSchema: false
5
6
  }
@@ -218,6 +218,7 @@ export function processSpeakableModules(modules) {
218
218
 
219
219
  export function webPageSchema(page, pageImage) {
220
220
  const speakAbleModules = processSpeakableModules(page?.sections?.main?.modules || []);
221
+ const toplistModule = page?.sections?.main?.modules && page?.sections?.main?.modules.find((module) => module.name === 'top_list');
221
222
 
222
223
  const schema = {
223
224
  '@context': 'https://schema.org',
@@ -235,6 +236,37 @@ export function webPageSchema(page, pageImage) {
235
236
  url: `${process.env.GATSBY_SITE_URL}`,
236
237
  inLanguage: getLanguage(page?.language),
237
238
  },
239
+ hasPart: SchemaConstant.includeToplistSchema && toplistModule?.items?.[0]?.items ?
240
+ toplistModule?.items?.[0]?.items.slice(0, 10).map((item, index) => ({
241
+ '@type': 'Recommendation',
242
+ position: index + 1,
243
+ reviewRating: {
244
+ '@type': 'Rating',
245
+ worstRating: 1,
246
+ bestRating: 5,
247
+ ratingValue: item?.rating,
248
+ },
249
+ author: {
250
+ "@type": "Person",
251
+ name: item?.author_name || page?.author?.name,
252
+ jobTitle: item?.author_title || page?.author?.author_title,
253
+ email: item?.author_email || page?.author?.email_address,
254
+ image: (item?.author_image || page?.author?.image) ? `${process.env.IMAGE_CDN_URL}/${item?.author_image || page?.author?.image}` : '',
255
+ sameAs: item?.author_same_as ? item?.author_same_as
256
+ .map((socialLink) => socialLink) : [
257
+ page?.author?.linkedin_profile,
258
+ page?.author?.twitter_profile,
259
+ page?.author?.facebook_profile,
260
+ page?.author?.instagram_profile,
261
+ ]
262
+ },
263
+ itemReviewed: {
264
+ "@type": "OnlineBusiness",
265
+ name: item?.name,
266
+ url: item?.review_link ? `${process.env.GATSBY_SITE_URL}${item?.review_link}` : '',
267
+ image: item?.logo?.filename ? `${process.env.IMAGE_CDN_URL}/${item?.logo?.filename}` : '',
268
+ }
269
+ })) : '',
238
270
  reviewedBy: page?.reviewer_id
239
271
  ? {
240
272
  '@type': 'Person',