2015-04-22 07:50:11 +09:00
|
|
|
Meteor.startup(function () {
|
|
|
|
|
|
|
|
// New Post RSS
|
|
|
|
|
|
|
|
Router.route('/feed.xml', function () {
|
|
|
|
this.response.write(servePostRSS('new', 'feed.xml'));
|
|
|
|
this.response.end();
|
|
|
|
}, {
|
|
|
|
name: 'feed',
|
|
|
|
where: 'server'
|
|
|
|
});
|
|
|
|
|
|
|
|
// New Post RSS
|
|
|
|
|
|
|
|
Router.route('/rss/posts/new.xml', function () {
|
|
|
|
this.response.write(servePostRSS('top', 'rss/posts/new.xml'));
|
|
|
|
this.response.end();
|
|
|
|
}, {
|
|
|
|
name: 'rss_posts_new',
|
|
|
|
where: 'server'
|
|
|
|
});
|
|
|
|
|
2015-08-07 14:12:09 +02:00
|
|
|
// Categories RSS
|
|
|
|
|
|
|
|
Router.route('/rss/category/:slug/feed.xml', function () {
|
|
|
|
this.response.write(servePostRSS('new', '/rss/category/:slug/feed.xml',this.params.slug));
|
|
|
|
this.response.end();
|
|
|
|
}, {
|
|
|
|
name: 'rss_posts_category',
|
|
|
|
where: 'server'
|
|
|
|
});
|
|
|
|
|
2015-04-22 07:50:11 +09:00
|
|
|
// Top Post RSS
|
|
|
|
|
|
|
|
Router.route('/rss/posts/top.xml', function () {
|
|
|
|
this.response.write(servePostRSS('top', 'rss/posts/top.xml'));
|
|
|
|
this.response.end();
|
|
|
|
}, {
|
|
|
|
name: 'rss_posts_top',
|
|
|
|
where: 'server'
|
|
|
|
});
|
|
|
|
|
|
|
|
// Best Post RSS
|
|
|
|
|
|
|
|
Router.route('/rss/posts/best.xml', function () {
|
|
|
|
this.response.write(servePostRSS('best', 'rss/posts/best.xml'));
|
|
|
|
this.response.end();
|
|
|
|
}, {
|
|
|
|
name: 'rss_posts_best',
|
|
|
|
where: 'server'
|
|
|
|
});
|
|
|
|
|
|
|
|
// Comment RSS
|
|
|
|
|
|
|
|
Router.route('/rss/comments.xml', function() {
|
|
|
|
this.response.write(serveCommentRSS());
|
|
|
|
this.response.end();
|
|
|
|
}, {
|
|
|
|
name: 'rss_comments',
|
|
|
|
where: 'server'
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|