diff --git a/src/Quintype/Seo/Base.php b/src/Quintype/Seo/Base.php index 64d3fc8..b9feb30 100644 --- a/src/Quintype/Seo/Base.php +++ b/src/Quintype/Seo/Base.php @@ -115,6 +115,14 @@ protected function getCanonicalUrl(){ } } + protected function getStandOutUrl(){ + if(isset($this->story['seo']['meta-google-news-standout'])){ + return ['rel:standout' => $this->config['sketches-host'] . "/". $this->story['slug']]; + } else { + []; + } + } + protected function getAlternateUrl(){ if(isset($this->config['android-package']) && $this->config['android-package'] !== ''){ $split_host_and_protocol = explode("://", $this->config['sketches-host']); diff --git a/src/Quintype/Seo/Story.php b/src/Quintype/Seo/Story.php index 6ddb6dc..4bc1fe1 100644 --- a/src/Quintype/Seo/Story.php +++ b/src/Quintype/Seo/Story.php @@ -16,7 +16,7 @@ public function __construct($config, $pageType, $story, $card = null) public function prepareTags() { if (sizeof($this->story) > 0) { - return [ + $allTags = [ 'title' => trim($this->getTitle()) . $this->titleTextToAppend, 'description' => trim($this->getDescription()), 'keywords' => trim($this->getKeywords(["stories" => $this->story])), @@ -37,6 +37,9 @@ public function prepareTags() 'al:android:app-name' => $this->getAndroidData('al:android:app-name'), 'al:android:url' => 'quintypefb://'.$this->config['sketches-host'].'/'.$this->story['slug'], ]; + $standOutUrl = $this->getStandOutUrl();//Check if the story is marked as standout story. + + return $standOutUrl ? array_merge($allTags, $standOutUrl) : $allTags; } else { return ['title' => $this->getPageTitle()]; }