Skip to content

Commit

Permalink
docs: fix references to undefined data variable (#22820)
Browse files Browse the repository at this point in the history
  • Loading branch information
demetrio authored Apr 6, 2020
1 parent 9e4a2bb commit 25c38ab
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions docs/tutorial/seo-and-social-sharing-cards-tutorial/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function SEO({ description, lang, meta }) {
// highlight-start
{
name: "keywords",
content: data.site.siteMetadata.keywords.join(","),
content: site.siteMetadata.keywords.join(","),
},
// highlight-end
]}
Expand Down Expand Up @@ -176,7 +176,7 @@ function SEO({ description, lang, meta, image: metaImage, title }) {
// highlight-start
const image =
metaImage && metaImage.src
? `${data.site.siteMetadata.siteUrl}${metaImage.src}`
? `${site.siteMetadata.siteUrl}${metaImage.src}`
: null
// highlight-end

Expand All @@ -194,7 +194,7 @@ function SEO({ description, lang, meta, image: metaImage, title }) {
},
{
name: "keywords",
content: data.site.siteMetadata.keywords.join(","),
content: site.siteMetadata.keywords.join(","),
},
{
property: `og:title`,
Expand Down Expand Up @@ -318,12 +318,10 @@ function SEO({ description, lang, meta, image: metaImage, title, pathname }) {
const metaDescription = description || site.siteMetadata.description
const image =
metaImage && metaImage.src
? `${data.site.siteMetadata.siteUrl}${metaImage.src}`
? `${site.siteMetadata.siteUrl}${metaImage.src}`
: null
// highlight-start
const canonical = pathname
? `${data.site.siteMetadata.siteUrl}${pathname}`
: null
const canonical = pathname ? `${site.siteMetadata.siteUrl}${pathname}` : null
// highlight-end

return (
Expand Down Expand Up @@ -352,7 +350,7 @@ function SEO({ description, lang, meta, image: metaImage, title, pathname }) {
},
{
name: "keywords",
content: data.site.siteMetadata.keywords.join(","),
content: site.siteMetadata.keywords.join(","),
},
{
property: `og:title`,
Expand Down

0 comments on commit 25c38ab

Please sign in to comment.