gatsby-core-theme 44.1.3 → 44.1.5
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,25 @@
|
|
|
1
|
+
## [44.1.5](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.1.4...v44.1.5) (2025-06-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add robots when default ([f21b61f](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/f21b61f5bdab54bb824199f88ddbbcfbcb482af7))
|
|
7
|
+
* search small fix for the autocomplete title ([986c51d](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/986c51d3c0225b6920e3f919ec85302d7f469728))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
* Merge branch 'head-robots-improvement' into 'master' ([243b624](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/243b6240a433208a5757b5d2f584a88d438559e1))
|
|
11
|
+
|
|
12
|
+
## [44.1.4](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.1.3...v44.1.4) (2025-06-03)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* imporve schema ([5ffa2c9](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/5ffa2c9349f41671cfc3b525c5bcf212c6317ffb))
|
|
18
|
+
* improve code ([d1efe70](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/d1efe7022da69ef2d4f6a22f0c1ab2836d9d5e21))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
* Merge branch 'schema-fixes' into 'master' ([c15d5e9](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/c15d5e93b4c0039554c73cb08b37a2db83ef80ed))
|
|
22
|
+
|
|
1
23
|
## [44.1.3](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.1.2...v44.1.3) (2025-05-29)
|
|
2
24
|
|
|
3
25
|
|
package/package.json
CHANGED
|
@@ -3,26 +3,33 @@ import React from "react";
|
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { schemaGenerator } from "~helpers/schema";
|
|
5
5
|
import keygen from "~helpers/keygen";
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
getUrl,
|
|
8
|
+
getLanguage,
|
|
9
|
+
getPageImage,
|
|
10
|
+
imagePrettyUrl,
|
|
11
|
+
} from "~helpers/getters";
|
|
7
12
|
import { getMetaTags, getCanonicalUrl } from "~helpers/head";
|
|
8
13
|
import customData from "./customData";
|
|
9
14
|
|
|
10
15
|
const HeadData = ({ page = {} }) => {
|
|
11
16
|
const isTracker = page.template === "tracker";
|
|
12
17
|
const metaTags = getMetaTags(page, isTracker);
|
|
18
|
+
const pageImage = getPageImage(page) || imagePrettyUrl(page.siteInfo?.site_logo);
|
|
19
|
+
|
|
13
20
|
let defaultHref = null;
|
|
14
21
|
|
|
15
22
|
return (
|
|
16
23
|
<>
|
|
17
24
|
<title>{page.meta_title}</title>
|
|
18
|
-
<html lang={getLanguage(page.language)} />
|
|
25
|
+
<html lang={process.env.GATSBY_SITE_LANG || getLanguage(page.language)} />
|
|
19
26
|
{metaTags}
|
|
20
27
|
{customData(page)}
|
|
21
28
|
{process.env.GATSBY_ACTIVE_ENV === "development" && (
|
|
22
29
|
<meta name="googlebot" content="noindex,follow" />
|
|
23
30
|
)}
|
|
24
31
|
<link rel="canonical" href={getCanonicalUrl(page, isTracker)} />\
|
|
25
|
-
{page?.hreflangs?.map((link) => {
|
|
32
|
+
{page?.hreflangs?.map((link) => {
|
|
26
33
|
if (link?.default) {
|
|
27
34
|
defaultHref = link?.path;
|
|
28
35
|
}
|
|
@@ -42,11 +49,14 @@ const HeadData = ({ page = {} }) => {
|
|
|
42
49
|
page.preconnect_links.map((link) => (
|
|
43
50
|
<link key={keygen()} rel="preconnect" href={link} />
|
|
44
51
|
))}
|
|
45
|
-
{schemaGenerator(page,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
{schemaGenerator(page, pageImage).map(
|
|
53
|
+
(schema) =>
|
|
54
|
+
schema && (
|
|
55
|
+
<script key={keygen()} type="application/ld+json">
|
|
56
|
+
{`${schema}`}
|
|
57
|
+
</script>
|
|
58
|
+
)
|
|
59
|
+
)}
|
|
50
60
|
</>
|
|
51
61
|
);
|
|
52
62
|
};
|
|
@@ -194,7 +194,7 @@ const SearchForm = ({
|
|
|
194
194
|
items.length > 0 && (
|
|
195
195
|
<React.Fragment key={type}>
|
|
196
196
|
<div className={styles.autoCompleteTitle}>
|
|
197
|
-
{useTranslate(`search_${type}`, type)}
|
|
197
|
+
{useTranslate(`search_${type}`, type?.replace('_', ' '))}
|
|
198
198
|
</div>
|
|
199
199
|
<div className={styles.autoCompleteList}>
|
|
200
200
|
{items.slice(0, loadedCounts[type]).map((value) => {
|
|
@@ -42,9 +42,7 @@ export default (page, isTracker) => {
|
|
|
42
42
|
type: "meta",
|
|
43
43
|
property: "og:locale",
|
|
44
44
|
content:
|
|
45
|
-
getLanguage(page.
|
|
46
|
-
? "en_GB"
|
|
47
|
-
: getLanguage(page.language),
|
|
45
|
+
getLanguage(page.market)
|
|
48
46
|
},
|
|
49
47
|
{ type: "meta", name:'geo.placename', content: process.env.PLACENAME },
|
|
50
48
|
{ type: "meta", name:'geo.region', content: process.env.COUNTRY },
|
package/src/helpers/head.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { getBonus } from "~helpers/getters";
|
|
3
3
|
import { generatePlaceholderString } from "~helpers/generators";
|
|
4
4
|
import keygen from "~helpers/keygen";
|
|
5
5
|
import metaTags from "~constants/metaTags";
|
|
6
6
|
|
|
7
|
-
export const getMetaTags = (page,
|
|
8
|
-
const pageImage = getPageImage(page) || imagePrettyUrl(siteInfo?.site_logo);
|
|
7
|
+
export const getMetaTags = (page, isTracker) =>
|
|
9
8
|
// eslint-disable-next-line array-callback-return
|
|
10
|
-
|
|
9
|
+
metaTags(page, isTracker).map((meta) => {
|
|
11
10
|
if (meta?.content) {
|
|
12
11
|
return (
|
|
13
12
|
<meta
|
|
@@ -17,8 +16,8 @@ export const getMetaTags = (page, siteInfo, isTracker) => {
|
|
|
17
16
|
/>
|
|
18
17
|
);
|
|
19
18
|
}
|
|
20
|
-
})
|
|
21
|
-
|
|
19
|
+
})
|
|
20
|
+
;
|
|
22
21
|
|
|
23
22
|
export function getCanonicalUrl(page, isTracker) {
|
|
24
23
|
if (page.canonical_url) {
|
|
@@ -54,6 +53,10 @@ export function getRobotOptions(options) {
|
|
|
54
53
|
array.push("nosnippet");
|
|
55
54
|
if (process.env.GATSBY_ACTIVE_ENV === "development")
|
|
56
55
|
array.push("noindex,follow");
|
|
56
|
+
|
|
57
|
+
if (process.env.GATSBY_ACTIVE_ENV !== "development" && array.length === 0){
|
|
58
|
+
array.push("index,follow,max-snippet:-1,max-video-preview:-1,max-image-preview:large");
|
|
59
|
+
}
|
|
57
60
|
return array.join();
|
|
58
61
|
}
|
|
59
62
|
|