LandingPage: schema and twitter images needed canonical urls

This commit is contained in:
Vesa Luusua 2018-03-16 12:06:04 +02:00
parent cfd50fe701
commit db83f8a916
2 changed files with 6 additions and 4 deletions

View file

@ -32,7 +32,7 @@ export const LandingPageComponent = props => {
const siteTitle = config.siteTitle;
const schemaTitle = intl.formatMessage({ id: 'LandingPage.schemaTitle' }, { siteTitle });
const schemaDescription = intl.formatMessage({ id: 'LandingPage.schemaDescription' });
const schemaImage = `${config.canonicalRootURL}/${facebookImage}`;
const schemaImage = `${config.canonicalRootURL}${facebookImage}`;
return (
<Page
@ -42,7 +42,9 @@ export const LandingPageComponent = props => {
description={schemaDescription}
title={schemaTitle}
facebookImages={[{ url: facebookImage, width: 1200, height: 630 }]}
twitterImages={[{ url: twitterImage, width: 600, height: 314 }]}
twitterImages={[
{ url: `${config.canonicalRootURL}${twitterImage}`, width: 600, height: 314 },
]}
schema={{
'@context': 'http://schema.org',
'@type': 'WebPage',

View file

@ -19,7 +19,7 @@ exports[`LandingPage matches snapshot 1`] = `
"@type": "WebPage",
"description": "LandingPage.schemaDescription",
"image": Array [
"http://localhost:3000/saunatimeFacebook-1200x630.jpg",
"http://localhost:3000saunatimeFacebook-1200x630.jpg",
],
"name": "LandingPage.schemaTitle",
}
@ -30,7 +30,7 @@ exports[`LandingPage matches snapshot 1`] = `
Array [
Object {
"height": 314,
"url": "saunatimeTwitter-600x314.jpg",
"url": "http://localhost:3000saunatimeTwitter-600x314.jpg",
"width": 600,
},
]