Vulcan/server/rss.js
Christian Bundy 86ec3ede93 Solve trivial JS errors
Using jshint and and fixmyjs I went through and removed 220 trivial
Javascript errors – mostly missing semicolons, and some properties that
weren’t written in dot notation. You can view the diff of jshint’s
output here:
https://gist.github.com/christianbundy/7b37c51bb6f7c8d739e7/revisions
2014-05-06 20:15:48 -07:00

22 lines
686 B
JavaScript

serveRSS = function() {
var feed = new RSS({
title: getSetting('title'),
description: getSetting('tagline'),
feed_url: Meteor.absoluteUrl()+'feed.xml',
site_url: Meteor.absoluteUrl(),
image_url: Meteor.absoluteUrl()+'img/favicon.png',
});
Posts.find({status: STATUS_APPROVED}, {sort: {submitted: -1}, limit: 20}).forEach(function(post) {
feed.item({
title: post.headline,
description: post.body+'</br></br> <a href="'+getPostUrl(post._id)+'">Comments</a>',
author: post.author,
date: post.submitted,
url: (post.url ? getOutgoingUrl(post.url) : getPostUrl(post._id)),
guid: post._id
});
});
return feed.xml();
};