mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Merge pull request #1388 from germanrcuriel/add-canonical-support
Add rel='canonical' support
This commit is contained in:
commit
dee054e2c3
1 changed files with 6 additions and 3 deletions
|
@ -297,6 +297,9 @@ coreHelpers.ghost_head = function (options) {
|
|||
|
||||
head.push('<meta name="generator" content="Ghost ' + trimmedVersion + '" />');
|
||||
head.push('<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss/">');
|
||||
if (this.path) {
|
||||
head.push('<link rel="canonical" href="' + coreHelpers.ghost.config().url + this.path + '" />');
|
||||
}
|
||||
|
||||
return coreHelpers.ghost.doFilter('ghost_head', head).then(function (head) {
|
||||
var headString = _.reduce(head, function (memo, item) { return memo + '\n' + item; }, '');
|
||||
|
|
Loading…
Reference in a new issue