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

Commit 7985595

Browse files
committed
Fix FE route seo data
1 parent 068d153 commit 7985595

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

api/wordpress/_global/getFrontendPage.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,13 @@ export default async function getFrontendPage(route) {
3838
response.defaultSeo = formatDefaultSeoData({homepageSettings, siteSeo})
3939

4040
// Set route SEO.
41-
return !frontendPageSeo?.[route]
42-
? null
43-
: {
44-
seo: {
45-
title: frontendPageSeo[route]?.title,
46-
description: frontendPageSeo[route]?.description
47-
}
48-
}
41+
return {
42+
seo: {
43+
title: frontendPageSeo?.[route]?.title,
44+
metaDesc: frontendPageSeo?.[route]?.description,
45+
canonical: `${response.defaultSeo?.openGraph?.url ?? ''}/${route}`
46+
}
47+
}
4948
})
5049
.catch((error) => {
5150
response.error = true

0 commit comments

Comments
 (0)