Skip to content

Commit

Permalink
Merge pull request #63 from xiaohutai/master
Browse files Browse the repository at this point in the history
Override canonical properly if overridden
  • Loading branch information
bobdenotter authored Jan 12, 2018
2 parents 8b04faf + 8d16e9f commit 1247de3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/SEO.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,12 @@ public function setCanonical($canonical = '')
}
$url = sprintf('%s%s', $paths['canonical'], $canonical);
$this->app['resources']->setUrl('canonicalurl', $url);
$this->app['canonical']->setOverride($url);
} else {

// Absolute link, so we don't add the domain.
$this->app['resources']->setUrl('canonicalurl', $canonical);
$this->app['canonical']->setOverride($canonical);
}
}
}
Expand Down

0 comments on commit 1247de3

Please sign in to comment.