mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
Merge pull request #431 from delgermurun/exclude-scheduled-posts-from-rss
Exclude posts scheduled in the future from the RSS feed
This commit is contained in:
commit
eeb961d905
1 changed files with 5 additions and 1 deletions
|
@ -13,7 +13,11 @@ var getMeta = function() {
|
|||
servePostRSS = function() {
|
||||
var feed = new RSS(getMeta());
|
||||
|
||||
Posts.find({status: STATUS_APPROVED}, {sort: {postedAt: -1}, limit: 20}).forEach(function(post) {
|
||||
filters = {
|
||||
status: STATUS_APPROVED,
|
||||
postedAt: {$lte: new Date()}
|
||||
};
|
||||
Posts.find(filters, {sort: {postedAt: -1}, limit: 20}).forEach(function(post) {
|
||||
var description = !!post.body ? post.body+'</br></br>' : '';
|
||||
feed.item({
|
||||
title: post.title,
|
||||
|
|
Loading…
Add table
Reference in a new issue