Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Commit

Permalink
Merge pull request #59 from ft-interactive/rss-feed
Browse files Browse the repository at this point in the history
RSS Feed changes
  • Loading branch information
Sumeet Adur committed Dec 23, 2015
2 parents aa643c0 + 2aafc74 commit 947d323
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,16 +406,15 @@ gulp.task('create-rss-feed', () => {
return new Date(words[b].submissiondate) - new Date(words[a].submissiondate);
});

let rssString = `<?xml version="1.0"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>${rssTitle}</title><link>${rssLink}</link><description>${rssDescription}</description>`;
let rssString = `<?xml version="1.0"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>${rssTitle}</title><link>${rssLink}</link><description>${rssDescription}</description><atom:link href="https://ig.ft.com/sites/guffipedia/rss.xml" rel="self" type="application/rss+xml" />`;
for (const word of dateIndex) {
rssString += '<item>';
rssString += `<title>${words[word].word}</title>`;
rssString += `<link>http://ig.ft.com/sites/guffipedia/${words[word].slug}/</link>`;
rssString += `<guid>http://ig.ft.com/sites/guffipedia/${words[word].slug}/</guid>`;
if(words[word].definition) {
let descriptionTemplate = Handlebars.compile('{{definition}}');
let descriptionHtml = descriptionTemplate({definition: words[word].definition});
rssString += `<description>${descriptionHtml}</description>`;
let description = Handlebars.compile('{{definition}}', {definition: words[word].definition});
rssString += `<description>${description}</description>`;
}
rssString += '</item>';
}
Expand Down

0 comments on commit 947d323

Please sign in to comment.