Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit 080e670

Browse files
committed
Merge branch 'staging' into develop
2 parents 0658294 + 24525b1 commit 080e670

File tree

3 files changed

+6
-22
lines changed

3 files changed

+6
-22
lines changed

api/wordpress/_partials/seoPostFields.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ const seoPostFields = `
1414
opengraphModifiedTime
1515
opengraphPublishedTime
1616
opengraphImage {
17-
altText
18-
sourceUrl(size: THUMBNAIL)
17+
sourceUrl(size: LARGE)
1918
}
2019
}
2120
`

components/common/Layout.js

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import Meta from '@/components/common/Meta'
22
import Footer from '@/components/organisms/Footer'
33
import Header from '@/components/organisms/Header'
4-
import {NextSeo, BlogJsonLd} from 'next-seo'
5-
import PropTypes from 'prop-types'
64
import {seoPropTypes} from '@/functions/getPagePropTypes'
5+
import {BlogJsonLd, NextSeo} from 'next-seo'
6+
import PropTypes from 'prop-types'
77

88
/**
99
* Render the Layout component.
@@ -16,18 +16,6 @@ import {seoPropTypes} from '@/functions/getPagePropTypes'
1616
* @return {Element} The Layout component.
1717
*/
1818
export default function Layout({children, seo, hasJsonLd}) {
19-
// Define SEO image prop.
20-
const seoImages = !seo?.opengraphImage?.sourceUrl
21-
? null
22-
: [
23-
{
24-
url: seo?.opengraphImage.sourceUrl,
25-
alt: seo?.opengraphImage?.altText,
26-
height: 150,
27-
width: 150
28-
}
29-
]
30-
3119
return (
3220
<>
3321
<NextSeo
@@ -36,7 +24,7 @@ export default function Layout({children, seo, hasJsonLd}) {
3624
openGraph={{
3725
title: seo?.title,
3826
description: seo?.metaDesc,
39-
images: seoImages ? [...seoImages] : null,
27+
images: [{url: seo?.opengraphImage?.sourceUrl}],
4028
url: seo?.canonical
4129
}}
4230
nofollow={'follow' !== seo?.metaRobotsNofollow}
@@ -46,7 +34,7 @@ export default function Layout({children, seo, hasJsonLd}) {
4634
<BlogJsonLd
4735
url={seo?.canonical}
4836
title={seo?.title}
49-
images={seoImages ? [...seoImages] : []}
37+
images={[seo?.opengraphImage.sourceUrl]}
5038
datePublished={seo?.opengraphPublishedTime}
5139
dateModified={seo?.opengraphModifiedTime}
5240
authorName={seo?.opengraphAuthor}

functions/formatDefaultSeoData.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ export default function formatDefaultSeoData(seoData) {
2121
siteName: siteSeo?.schema?.siteName ?? '',
2222
images: [
2323
{
24-
url: siteSeo?.openGraph?.defaultImage?.sourceUrl ?? '',
25-
alt: siteSeo?.openGraph?.defaultImage?.altText ?? '',
26-
height: 150,
27-
width: 150
24+
url: siteSeo?.openGraph?.defaultImage?.sourceUrl ?? ''
2825
}
2926
]
3027
},

0 commit comments

Comments
 (0)