From 599d233be95c5db5ff215fb760d6e449f27066d4 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Mon, 2 Sep 2013 21:04:33 +0100 Subject: [PATCH] RSS Feed Autodetection closes #599 - {{ghost_head}} now outputs feed link tag --- core/server/helpers/index.js | 3 ++- core/test/unit/server_helpers_index_spec.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/server/helpers/index.js b/core/server/helpers/index.js index 295200ea49..485717f773 100644 --- a/core/server/helpers/index.js +++ b/core/server/helpers/index.js @@ -166,9 +166,10 @@ coreHelpers = function (ghost) { ghost.registerThemeHelper('ghost_head', function (options) { var head = []; head.push(''); + head.push(''); 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()); }); }); diff --git a/core/test/unit/server_helpers_index_spec.js b/core/test/unit/server_helpers_index_spec.js index 4097954e51..7ad16cad19 100644 --- a/core/test/unit/server_helpers_index_spec.js +++ b/core/test/unit/server_helpers_index_spec.js @@ -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(''); + rendered.string.should.equal('\n'); }); });