Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Using jade template to render rss-feed in nodejs
doctype xml
title= feed.title
description= feed.description
language= feed.en
for item in posts
title= item.title
pubDate= item.pubDate
description= item.description
link= item.canonicalUrl
var fs = require('fs');
var jade = require('jade');
var html = fs.readFileSync('./rss.jade').toString();
var options = {
feed: {
title: 'feed title',
description: 'feed description',
link: '',
language: 'en'
posts: [{
title: 'post1 title',
description: 'post1 summary',
canonicalUrl: '',
pubDate: (new Date()).toGMTString()
jade.render(html, options, function (err, html) {
if (err) {
throw err;
Copy link

shakirahas commented Apr 2, 2017

am doing my project about multi agent news system.and my problem is how to link the rss feeds that are my source of news to the jade platform yet an using netbeans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment