From 921bde953b0209c755cb750650045bf8cfa5fc2d Mon Sep 17 00:00:00 2001
From: Jared Malcolm <1476753+Jared-Dev@users.noreply.github.com>
Date: Sat, 18 May 2019 04:19:08 -0500
Subject: [PATCH] fix(www): Add og:url meta property to fix LinkedIn shares
(#14121)
---
www/src/templates/template-blog-post.js | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/www/src/templates/template-blog-post.js b/www/src/templates/template-blog-post.js
index 0fbfe7e0b0ff7..4dc319deec9e1 100644
--- a/www/src/templates/template-blog-post.js
+++ b/www/src/templates/template-blog-post.js
@@ -37,9 +37,11 @@ const renderAst = new rehypeReact({
class BlogPostTemplate extends React.Component {
render() {
- const post = this.props.data.markdownRemark
- const prev = this.props.pageContext.prev
- const next = this.props.pageContext.next
+ const {
+ pageContext: { prev, next },
+ data: { markdownRemark: post },
+ location: { href },
+ } = this.props
const prevNextLinkStyles = {
"&&": {
borderBottom: 0,
@@ -73,7 +75,6 @@ class BlogPostTemplate extends React.Component {
)
}
-
return (
@@ -109,6 +110,7 @@ class BlogPostTemplate extends React.Component {
+
{post.frontmatter.image && (