Skip to content

Commit

Permalink
Fix canonical url and image issue
Browse files Browse the repository at this point in the history
  • Loading branch information
munirajun committed Feb 9, 2018
1 parent 5634b1d commit a347baf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Quintype/Seo/Story.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private function getCardShareOgAttributes()
$attributes = [
'title' => isset($this->cardSocialShare["title"])? $this->cardSocialShare["title"] : trim($this->getTitle()),
'type' => 'article',
'url' => "{$this->config['sketches-host']}/{$this->story['slug']}/{$card['id']}",
'url' => $this->getCanonicalUrl(). "/". $this->card['id'],
'site-name' => trim($this->config['title']),
'description' => isset($this->cardSocialShare["message"])? $this->cardSocialShare["message"] : trim($this->getSocialDescription()),
'image' => isset($this->cardSocialShare["image"])? $this->getCardImageUrl() : $this->getHeroImageUrl(),
Expand Down Expand Up @@ -216,7 +216,7 @@ private function getHeroImageUrl()

private function getCardImageUrl()
{
return $this->getImageCDNUrl($this->card['metadata']['image']['key']);
return $this->getImageCDNUrl($this->cardSocialShare['image']['key']);
}

private function getImageCDNUrl($imageS3Key)
Expand Down

0 comments on commit a347baf

Please sign in to comment.