diff --git a/src/components/Seo/Seo.js b/src/components/Seo/Seo.js index b29ff86..3ef3802 100644 --- a/src/components/Seo/Seo.js +++ b/src/components/Seo/Seo.js @@ -12,8 +12,8 @@ const Seo = props => { const title = postTitle ? `${postTitle} - ${config.shortSiteTitle}` : config.siteTitle; const description = postDescription ? postDescription : config.siteDescription; - const image = postCover ? postCover : config.siteImage; - const url = config.siteUrl + config.pathPrefix + postSlug; + const image = postCover ? config.siteUrl + config.pathPrefix + postCover.childImageSharp.resize.src : config.siteUrl + config.pathPrefix + "/" + config.siteImage; + const url = postSlug ? config.siteUrl + postSlug : (typeof window !== 'undefined') ? config.siteUrl + window.location.pathname : config.siteUrl; return (