diff --git a/src/templates/ProductPageTemplate.js b/src/templates/ProductPageTemplate.js index 5a249b97..f4e309b9 100644 --- a/src/templates/ProductPageTemplate.js +++ b/src/templates/ProductPageTemplate.js @@ -10,13 +10,20 @@ const removeCareInstructions = desc => const ProductPageTemplate = props => { const { - site, - shopifyProduct: product, - shopifyProduct: { title, description: fullDescription, handle } - } = props.data; + data: { + site, + shopifyProduct: product, + shopifyProduct: { title, description: fullDescription, handle } + }, + location: { pathname } + } = props; + const { + siteMetadata: { siteUrl } + } = site; const description = removeCareInstructions(fullDescription); const image = product.images[0].localFile.childImageSharp.fluid.src; + const canonical = `${siteUrl}${pathname}`; return ( @@ -32,21 +39,16 @@ const ProductPageTemplate = props => { {title} + - + {/* TODO: add the image */} - +