Skip to content

Commit

Permalink
SEO Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwiemer committed Mar 6, 2019
1 parent ece1cfc commit 55fde14
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/components/general/SEO.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,34 +29,34 @@ const SEO = props => (
{typeof window !== `undefined` && (
<meta property="og:url" content={location.href} />
)}
<meta
property="og:image"
content={props.image ? props.image.ogimg.src : defaultImage}
/>

{props.image ? (
<meta property="og:image:width" content={props.image.ogimg.width} />
<>
<meta
property="og:image"
content={
props.image ? `https:${props.image.ogimg.src}` : defaultImage
}
/>
<meta property="og:image:width" content={props.image.ogimg.width} />
<meta property="og:image:height" content={props.image.ogimg.height} />
</>
) : null}
{props.image ? (
<meta property="og:image:height" content={props.image.ogimg.height} />
) : null}

<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:creator" content="@ryanwiemer" />
<meta
name="twitter:title"
content={props.title ? `${props.title} - ${defaultTitle}` : defaultTitle}
/>
<meta
name="twitter:description"
content={props.description ? props.description : defaultDescription}
/>
{props.image ? (
<meta
name="twitter:image"
content={props.image ? props.image.ogimg.src : defaultImage}
content={props.image ? `https:${props.image.ogimg.src}` : defaultImage}
/>
) : null}
<meta
name="twitter:description"
content={props.description ? props.description : defaultDescription}
/>
</Helmet>
)

Expand Down

0 comments on commit 55fde14

Please sign in to comment.