gatsby-matrix-theme 53.16.4 → 53.17.0
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,20 @@
|
|
|
1
|
+
# [53.17.0](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/compare/v53.16.5...v53.17.0) (2026-05-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
* Merge branch 'en-501-update-schema-output' into 'master' ([a2b314a](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/a2b314acca53998cd00c4ce1aae5465ab99c6769))
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* update schema output ([567b828](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/567b828497ce8ffd12d57c45fa1db9bfedf4fd8d))
|
|
10
|
+
|
|
11
|
+
## [53.16.5](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/compare/v53.16.4...v53.16.5) (2026-05-06)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Config
|
|
15
|
+
|
|
16
|
+
* update theme version ([7260959](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/commit/72609592d95eb48b6753bfc273bbedb19fba833f))
|
|
17
|
+
|
|
1
18
|
## [53.16.4](https://gitlab.com/g2m-gentoo/team-floyd/themes/matrix-theme/compare/v53.16.3...v53.16.4) (2026-05-05)
|
|
2
19
|
|
|
3
20
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-matrix-theme",
|
|
3
|
-
"version": "53.
|
|
3
|
+
"version": "53.17.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "Matrix Theme NPM Package",
|
|
6
6
|
"author": "",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@react-icons/all-files": "^4.1.0",
|
|
27
27
|
"@gigmedia/enigma-utils": "^1.20.0",
|
|
28
28
|
"gatsby": "^5.11.0",
|
|
29
|
-
"gatsby-core-theme": "^44.
|
|
29
|
+
"gatsby-core-theme": "^44.24.0",
|
|
30
30
|
"gatsby-plugin-sharp": "^5.11.0",
|
|
31
31
|
"gatsby-plugin-sitemap": "^6.13.1",
|
|
32
32
|
"gatsby-transformer-sharp": "^5.11.0",
|
|
@@ -4,8 +4,13 @@ import {
|
|
|
4
4
|
webPageSchema,
|
|
5
5
|
organizationSchema,
|
|
6
6
|
moduleSchemas,
|
|
7
|
-
|
|
7
|
+
customSchema,
|
|
8
|
+
getAuthors,
|
|
9
|
+
generateSchemaObject,
|
|
10
|
+
prosAndConsData,
|
|
8
11
|
} from 'gatsby-core-theme/src/helpers/schema';
|
|
12
|
+
import { getGameRating, getUrl, imagePrettyUrl } from 'gatsby-core-theme/src/helpers/getters';
|
|
13
|
+
import { SchemaConstant } from 'gatsby-core-theme/src/constants/schema';
|
|
9
14
|
|
|
10
15
|
const knowsAbout = [
|
|
11
16
|
{
|
|
@@ -41,18 +46,120 @@ const knowsAbout = [
|
|
|
41
46
|
],
|
|
42
47
|
},
|
|
43
48
|
];
|
|
49
|
+
export function templateSchemas(page, pageImage) {
|
|
50
|
+
const sharedProps = {
|
|
51
|
+
author: getAuthors(page),
|
|
52
|
+
datePublished: page?.manual_published_date || page?.created_at,
|
|
53
|
+
dateModified: page?.manual_updated_date || page?.updated_at,
|
|
54
|
+
publisher: {
|
|
55
|
+
'@type': 'Organization',
|
|
56
|
+
name:
|
|
57
|
+
page.siteSchema?.owned_by ||
|
|
58
|
+
customSchema[process.env.GATSBY_SITE_NAME] ||
|
|
59
|
+
page.siteInfo?.site_name ||
|
|
60
|
+
process.env.GATSBY_SITE_NAME,
|
|
61
|
+
logo:
|
|
62
|
+
(page.siteInfo?.site_logo && `${process.env.IMAGE_CDN_URL}/${page.siteInfo.site_logo}`) ||
|
|
63
|
+
page.featured_image_object?.url ||
|
|
64
|
+
pageImage,
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
switch (page.relation_type) {
|
|
68
|
+
case 'article': {
|
|
69
|
+
const schema = {
|
|
70
|
+
'@context': 'https://schema.org',
|
|
71
|
+
'@type': 'Article',
|
|
72
|
+
'@id': `${getUrl(page.path)}#article`,
|
|
73
|
+
url: getUrl(page.path),
|
|
74
|
+
headline: page.title,
|
|
75
|
+
mainEntityOfPage: {
|
|
76
|
+
'@type': 'WebPage',
|
|
77
|
+
url: process.env.GATSBY_SITE_URL,
|
|
78
|
+
},
|
|
79
|
+
...sharedProps,
|
|
80
|
+
};
|
|
44
81
|
|
|
82
|
+
return JSON.stringify(generateSchemaObject(schema));
|
|
83
|
+
}
|
|
84
|
+
case 'operator': {
|
|
85
|
+
const schema = {
|
|
86
|
+
'@context': 'https://schema.org',
|
|
87
|
+
'@type': 'Review',
|
|
88
|
+
'@id': `${getUrl(page.path)}#review`,
|
|
89
|
+
...prosAndConsData(page),
|
|
90
|
+
name: page.relation?.name || '',
|
|
91
|
+
reviewBody: page.extra_fields?.operator_summary || '',
|
|
92
|
+
itemReviewed: {
|
|
93
|
+
'@type': 'Organization',
|
|
94
|
+
url: getUrl(page.path),
|
|
95
|
+
name: page.title || '',
|
|
96
|
+
image: imagePrettyUrl(
|
|
97
|
+
page.relation?.logo?.filename,
|
|
98
|
+
SchemaConstant.operatorHeaderWidth,
|
|
99
|
+
SchemaConstant.operatorHeaderHeight
|
|
100
|
+
),
|
|
101
|
+
},
|
|
102
|
+
reviewRating: {
|
|
103
|
+
'@type': 'Rating',
|
|
104
|
+
bestRating: '5',
|
|
105
|
+
worstRating: '0',
|
|
106
|
+
ratingValue: page.relation?.rating?.toString() || '',
|
|
107
|
+
},
|
|
108
|
+
...sharedProps,
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
return JSON.stringify(generateSchemaObject(schema));
|
|
112
|
+
}
|
|
113
|
+
case 'game': {
|
|
114
|
+
const rating = Math.floor(getGameRating(page.relation) * 2);
|
|
115
|
+
const schema = {
|
|
116
|
+
'@context': 'https://schema.org',
|
|
117
|
+
'@type': 'VideoGame',
|
|
118
|
+
'@id': `${getUrl(page.path)}#videogame`,
|
|
119
|
+
url: getUrl(page.path),
|
|
120
|
+
name: page.relation?.name || '',
|
|
121
|
+
description: page.extra_fields?.game_summary || '',
|
|
122
|
+
operatingSystem: 'Multi-platform',
|
|
123
|
+
applicationCategory: ['Game'],
|
|
124
|
+
author: {
|
|
125
|
+
'@type': 'Organization',
|
|
126
|
+
name: process.env.GATSBY_SITE_NAME,
|
|
127
|
+
url: process.env.GATSBY_SITE_URL,
|
|
128
|
+
},
|
|
129
|
+
review: {
|
|
130
|
+
'@type': 'Review',
|
|
131
|
+
...prosAndConsData(page),
|
|
132
|
+
name: page.relation?.name || '',
|
|
133
|
+
reviewRating: {
|
|
134
|
+
'@type': 'Rating',
|
|
135
|
+
bestRating: '10',
|
|
136
|
+
worstRating: '0',
|
|
137
|
+
ratingValue: rating?.toString() || '',
|
|
138
|
+
},
|
|
139
|
+
...sharedProps,
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
return JSON.stringify(generateSchemaObject(schema));
|
|
144
|
+
}
|
|
145
|
+
default:
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
45
149
|
export function schemaGenerator(page = {}, pageImage) {
|
|
46
150
|
const isNSA = process.env.GATSBY_SITE_NAME === 'norskespilleautomater.com';
|
|
47
151
|
const isHomepage = page.path === '/';
|
|
48
|
-
const tracker = page?.template === 'tracker';
|
|
152
|
+
const tracker = page?.template === 'tracker';
|
|
49
153
|
if (isNSA) {
|
|
50
154
|
page.knowsAbout = knowsAbout;
|
|
51
155
|
}
|
|
52
|
-
|
|
156
|
+
const includeWebpageSchemaInAllPages =
|
|
157
|
+
process.env.GATSBY_INCLUDE_WEBPAGE_SCHEMA_IN_ALL_PAGES === 'true';
|
|
53
158
|
// Temporary Change for removing webPageSchema
|
|
54
159
|
const hasWebPageSchema =
|
|
55
|
-
(page.relation_type !== 'operator' && page.relation_type !== 'game') ||
|
|
160
|
+
(page.relation_type !== 'operator' && page.relation_type !== 'game') ||
|
|
161
|
+
isNSA ||
|
|
162
|
+
includeWebpageSchemaInAllPages;
|
|
56
163
|
const hasOrganisationSchema = page.path === '/' || page.path === 'about-us';
|
|
57
164
|
const jsonSchema = [
|
|
58
165
|
// Page Schema
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"generatedAt":
|
|
1
|
+
{"generatedAt":1778503504920,"builder":{"name":"webpack5"},"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"metaFramework":{"name":"Gatsby","packageName":"gatsby","version":"5.13.6"},"monorepo":"Workspaces","packageManager":{"type":"yarn","version":"1.22.19"},"storybookVersion":"6.5.16","language":"javascript","storybookPackages":{"@storybook/addon-actions":{"version":"6.5.16"},"@storybook/builder-webpack5":{"version":"6.5.16"},"@storybook/manager-webpack5":{"version":"6.5.16"},"@storybook/react":{"version":"6.5.16"}},"framework":{"name":"react"},"addons":{"@storybook/addon-links":{"version":"6.5.16"},"@storybook/addon-essentials":{"version":"6.5.16"}}}
|