Skip to content

Commit

Permalink
Fix: description
Browse files Browse the repository at this point in the history
  • Loading branch information
luciobenini committed Oct 22, 2020
1 parent fb06047 commit c299947
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@pittica/gatsby-plugin-seo",
"private": false,
"description": "SEO optimization plugin for GatsbyJS.",
"version": "1.2.0",
"version": "1.2.1",
"author": {
"name": "Lucio Benini",
"email": "info@pittica.com",
Expand Down
10 changes: 5 additions & 5 deletions src/seo.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const SEO = ({ postData, frontmatter, image, isBlogPost, title, path, descriptio
: postMeta.title
? postMeta.title
: site.siteMetadata.title
const description = description || postMeta.description || site.siteMetadata.description
const postDescription = description || postMeta.description || site.siteMetadata.description
const postImage = image
? `${siteUrl}/${image.replace(/^\//, "")}`
: `${siteUrl}/${siteBuildMetadata.fields.seo.image.replace(/^\//, "")}`
Expand All @@ -58,18 +58,18 @@ const SEO = ({ postData, frontmatter, image, isBlogPost, title, path, descriptio
title={postTitle}
titleTemplate={title ? `%s | ${site.siteMetadata.title}` : site.siteMetadata.title}
>
<meta name="description" content={description} />
<meta name="description" content={postDescription} />
<meta name="image" content={postImage} />
<link rel="canonical" href={url} />
</Helmet>
<OpenGraph url={url} article={isBlogPost} title={postTitle} description={description} image={postImage} />
<TwitterCard title={postTitle} description={description} image={postImage} />
<OpenGraph url={url} article={isBlogPost} title={postTitle} description={postDescription} image={postImage} />
<TwitterCard title={postTitle} description={postDescription} image={postImage} />
<SchemaOrg
isBlogPost={isBlogPost}
url={url}
title={postTitle}
image={postImage}
description={description}
description={postDescription}
datePublished={datePublished}
siteUrl={site.siteMetadata.siteUrl}
author={site.siteMetadata.author}
Expand Down

0 comments on commit c299947

Please sign in to comment.