mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Merge pull request #1524 from jgillich/rss
Set RSS link title to blog title
This commit is contained in:
commit
216dd75b2c
2 changed files with 5 additions and 4 deletions
|
@ -291,12 +291,13 @@ coreHelpers.ghost_head = function (options) {
|
|||
/*jslint unparam:true*/
|
||||
var head = [],
|
||||
majorMinor = /^(\d+\.)?(\d+)/,
|
||||
trimmedVersion = this.version;
|
||||
trimmedVersion = this.version,
|
||||
blog = coreHelpers.ghost.blogGlobals();
|
||||
|
||||
trimmedVersion = trimmedVersion ? trimmedVersion.match(majorMinor)[0] : '?';
|
||||
|
||||
head.push('<meta name="generator" content="Ghost ' + trimmedVersion + '" />');
|
||||
head.push('<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss/">');
|
||||
head.push('<link rel="alternate" type="application/rss+xml" title="' + _.escape(blog.title) + '" href="/rss/">');
|
||||
if (this.path) {
|
||||
head.push('<link rel="canonical" href="' + coreHelpers.ghost.config().url + this.path + '" />');
|
||||
}
|
||||
|
|
|
@ -242,7 +242,7 @@ describe('Core Helpers', function () {
|
|||
it('returns meta tag string', function (done) {
|
||||
helpers.ghost_head.call({version: "0.3.0"}).then(function (rendered) {
|
||||
should.exist(rendered);
|
||||
rendered.string.should.equal('<meta name="generator" content="Ghost 0.3" />\n<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss/">');
|
||||
rendered.string.should.equal('<meta name="generator" content="Ghost 0.3" />\n<link rel="alternate" type="application/rss+xml" title="Ghost" href="/rss/">');
|
||||
|
||||
done();
|
||||
});
|
||||
|
@ -251,7 +251,7 @@ describe('Core Helpers', function () {
|
|||
it('returns meta tag string even if version is invalid', function () {
|
||||
var rendered = helpers.ghost_head.call({version: "0.9"}).then(function (rendered) {
|
||||
should.exist(rendered);
|
||||
rendered.string.should.equal('<meta name="generator" content="Ghost 0.9" />\n<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss/">');
|
||||
rendered.string.should.equal('<meta name="generator" content="Ghost 0.9" />\n<link rel="alternate" type="application/rss+xml" title="Ghost" href="/rss/">');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue