mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 12:16:37 -04:00
23 lines
No EOL
706 B
JavaScript
23 lines
No EOL
706 B
JavaScript
// serve up RSS at the right url
|
|
Meteor.serve('feed.xml', 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}}).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 ? post.url : getPostUrl(post._id)),
|
|
guid: post._id
|
|
});
|
|
});
|
|
|
|
return feed.xml();
|
|
}); |