gatsby-core-theme 12.0.2 → 12.0.4-beta.1
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 +17 -0
- package/gatsby-node.esm.js +37 -35
- package/package.json +1 -1
- package/src/helpers/generators.js +7 -3
- package/src/helpers/getters.js +2 -2
- package/src/helpers/schema.js +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## [12.0.4-beta.1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v12.0.3...v12.0.4-beta.1) (2022-10-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* chnaged logic for live stream tracker links ([5efb851](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/5efb851401b8f99722ef2491514d2f08329ecef7))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
* Merge branch 'tm-3082-tracker-links' into 'beta' ([109371d](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/109371d239ca8765afa649227a858a4ae2edc174))
|
|
10
|
+
|
|
11
|
+
## [12.0.3](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v12.0.2...v12.0.3) (2022-10-10)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* fix warnings in schema ([1e48075](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/1e4807503936bdfe77e34eac7c0606ceac040974))
|
|
17
|
+
|
|
1
18
|
## [12.0.2](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v12.0.1...v12.0.2) (2022-10-05)
|
|
2
19
|
|
|
3
20
|
|
package/gatsby-node.esm.js
CHANGED
|
@@ -291,7 +291,7 @@ exports.createPages = async ({ actions: { createPage } }, themeOptions) => {
|
|
|
291
291
|
{}
|
|
292
292
|
).forEach((providerId) => {
|
|
293
293
|
const provider = processed.relations.sports_data.providers[providerId];
|
|
294
|
-
const tracker = generateTrackerLink(provider, 'main');
|
|
294
|
+
const tracker = generateTrackerLink(provider, 'main', true);
|
|
295
295
|
const trackerPageObject = {
|
|
296
296
|
meta_title: 'Tracker',
|
|
297
297
|
template: 'tracker',
|
|
@@ -309,45 +309,47 @@ exports.createPages = async ({ actions: { createPage } }, themeOptions) => {
|
|
|
309
309
|
siteInfo,
|
|
310
310
|
provider,
|
|
311
311
|
isTracker: true,
|
|
312
|
+
isLiveStreamProvider: false,
|
|
312
313
|
meta_robots: ['noindex', 'nofollow'],
|
|
313
314
|
},
|
|
314
315
|
});
|
|
315
316
|
});
|
|
316
|
-
} else {
|
|
317
|
-
Object.keys(operators || {}).forEach((operatorId) => {
|
|
318
|
-
const operator = operators[operatorId];
|
|
319
|
-
const trackerLinks = Object.keys(operator.links);
|
|
320
|
-
const tracker = trackerLinks.map((key) =>
|
|
321
|
-
operator.links[key]
|
|
322
|
-
? generateTrackerLink(operator, key).toLowerCase().replace(' ', '_')
|
|
323
|
-
: null
|
|
324
|
-
);
|
|
325
|
-
tracker.forEach((trackerPath) => {
|
|
326
|
-
// Create splash page
|
|
327
|
-
if (trackerPath) {
|
|
328
|
-
const trackerPageObject = {
|
|
329
|
-
meta_title: 'Tracker',
|
|
330
|
-
template: 'tracker',
|
|
331
|
-
title: 'Tracker',
|
|
332
|
-
type: 'page',
|
|
333
|
-
language: languageKey,
|
|
334
|
-
path: trackerPath,
|
|
335
|
-
meta_robots: ['noindex', 'nofollow'],
|
|
336
|
-
};
|
|
337
|
-
createPage({
|
|
338
|
-
path: trackerPath,
|
|
339
|
-
component: require.resolve('./src/components/app.js'),
|
|
340
|
-
context: {
|
|
341
|
-
page: trackerPageObject,
|
|
342
|
-
siteInfo,
|
|
343
|
-
operator,
|
|
344
|
-
isTracker: true,
|
|
345
|
-
},
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
});
|
|
349
|
-
});
|
|
350
317
|
}
|
|
318
|
+
|
|
319
|
+
Object.keys(operators || {}).forEach((operatorId) => {
|
|
320
|
+
const operator = operators[operatorId];
|
|
321
|
+
const trackerLinks = Object.keys(operator.links);
|
|
322
|
+
const tracker = trackerLinks.map((key) =>
|
|
323
|
+
operator.links[key]
|
|
324
|
+
? generateTrackerLink(operator, key).toLowerCase().replace(' ', '_')
|
|
325
|
+
: null
|
|
326
|
+
);
|
|
327
|
+
tracker.forEach((trackerPath) => {
|
|
328
|
+
// Create splash page
|
|
329
|
+
if (trackerPath) {
|
|
330
|
+
const trackerPageObject = {
|
|
331
|
+
meta_title: 'Tracker',
|
|
332
|
+
template: 'tracker',
|
|
333
|
+
title: 'Tracker',
|
|
334
|
+
type: 'page',
|
|
335
|
+
language: languageKey,
|
|
336
|
+
path: trackerPath,
|
|
337
|
+
meta_robots: ['noindex', 'nofollow'],
|
|
338
|
+
};
|
|
339
|
+
createPage({
|
|
340
|
+
path: trackerPath,
|
|
341
|
+
component: require.resolve('./src/components/app.js'),
|
|
342
|
+
context: {
|
|
343
|
+
page: trackerPageObject,
|
|
344
|
+
siteInfo,
|
|
345
|
+
operator,
|
|
346
|
+
isTracker: true,
|
|
347
|
+
isLiveStreamProvider: false,
|
|
348
|
+
},
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
});
|
|
352
|
+
});
|
|
351
353
|
};
|
|
352
354
|
|
|
353
355
|
exports.onCreatePage = ({ page, actions }) => {
|
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { months } from '../constants/common';
|
|
2
2
|
|
|
3
|
-
export function generateTrackerLink(operator, trackerType) {
|
|
4
|
-
const defaultTrackerFormat =
|
|
5
|
-
|
|
3
|
+
export function generateTrackerLink(operator, trackerType, provider = false) {
|
|
4
|
+
const defaultTrackerFormat = provider
|
|
5
|
+
? process.env.PROVIDER_TRACKER_LINK_FORMAT_MAIN
|
|
6
|
+
: process.env.TRACKER_LINK_FORMAT_MAIN;
|
|
7
|
+
const trackerFormat = provider
|
|
8
|
+
? process.env.PROVIDER_TRACKER_LINK_FORMAT_NON_MAIN
|
|
9
|
+
: process.env.TRACKER_LINK_FORMAT_NON_MAIN;
|
|
6
10
|
|
|
7
11
|
if (defaultTrackerFormat && trackerFormat) {
|
|
8
12
|
const linkFormatArray =
|
package/src/helpers/getters.js
CHANGED
|
@@ -177,7 +177,7 @@ export function getPageImage(page) {
|
|
|
177
177
|
return null;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
export function prettyTracker(operator, trackerType = 'main') {
|
|
180
|
+
export function prettyTracker(operator, trackerType = 'main', provider = false) {
|
|
181
181
|
if (!operator || !operator.short_name) {
|
|
182
182
|
return null;
|
|
183
183
|
}
|
|
@@ -190,7 +190,7 @@ export function prettyTracker(operator, trackerType = 'main') {
|
|
|
190
190
|
trackerType = 'main';
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
return generateTrackerLink(operator, trackerType);
|
|
193
|
+
return generateTrackerLink(operator, trackerType, provider);
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
export function getBonus(name, operator) {
|
package/src/helpers/schema.js
CHANGED
|
@@ -351,10 +351,11 @@ export function webPageSchema(page, pageImage) {
|
|
|
351
351
|
description: page?.meta_title,
|
|
352
352
|
},
|
|
353
353
|
publisher: {
|
|
354
|
-
'@type': '
|
|
354
|
+
'@type': 'CreativeWork',
|
|
355
355
|
url: getUrl('/'),
|
|
356
356
|
name: page?.meta_title,
|
|
357
357
|
publisher: {
|
|
358
|
+
'@type': 'Organization',
|
|
358
359
|
'@id': `${getUrl('/')}#organization`,
|
|
359
360
|
},
|
|
360
361
|
potentialAction: {
|