mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Merge pull request #613 from ErisDS/rss-feed-detection
RSS Feed Autodetection
This commit is contained in:
commit
f0cebf9925
2 changed files with 3 additions and 2 deletions
|
@ -166,9 +166,10 @@ coreHelpers = function (ghost) {
|
|||
ghost.registerThemeHelper('ghost_head', function (options) {
|
||||
var head = [];
|
||||
head.push('<meta name="generator" content="Ghost ' + this.version + '" />');
|
||||
head.push('<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss/">');
|
||||
|
||||
return ghost.doFilter('ghost_head', head, function (head) {
|
||||
var headString = _.reduce(head, function (memo, item) { return memo + ' ' + item; }, '');
|
||||
var headString = _.reduce(head, function (memo, item) { return memo + "\n" + item; }, '');
|
||||
return new hbs.handlebars.SafeString(headString.trim());
|
||||
});
|
||||
});
|
||||
|
|
|
@ -188,7 +188,7 @@ describe('Core Helpers', function () {
|
|||
it('returns meta tag string', function () {
|
||||
var rendered = handlebars.helpers.ghost_head.call({version: "0.3"});
|
||||
should.exist(rendered);
|
||||
rendered.string.should.equal('<meta name="generator" content="Ghost 0.3" />');
|
||||
rendered.string.should.equal('<meta name="generator" content="Ghost 0.3" />\n<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss/">');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue