From 2aafc74c197b3a8af08bb4faf3fa28b4885117ba Mon Sep 17 00:00:00 2001 From: Sumeet Adur Date: Wed, 23 Dec 2015 10:42:12 +0000 Subject: [PATCH] RSS Feed: add atom:link element, simplified compilation of item description --- gulpfile.babel.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 2a5a156..1470019 100755 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -406,16 +406,15 @@ gulp.task('create-rss-feed', () => { return new Date(words[b].submissiondate) - new Date(words[a].submissiondate); }); - let rssString = `${rssTitle}${rssLink}${rssDescription}`; + let rssString = `${rssTitle}${rssLink}${rssDescription}`; for (const word of dateIndex) { rssString += ''; rssString += `${words[word].word}`; rssString += `http://ig.ft.com/sites/guffipedia/${words[word].slug}/`; rssString += `http://ig.ft.com/sites/guffipedia/${words[word].slug}/`; if(words[word].definition) { - let descriptionTemplate = Handlebars.compile('{{definition}}'); - let descriptionHtml = descriptionTemplate({definition: words[word].definition}); - rssString += `${descriptionHtml}`; + let description = Handlebars.compile('{{definition}}', {definition: words[word].definition}); + rssString += `${description}`; } rssString += ''; }