Skip to content

Commit

Permalink
Merge 4c46820 into f1977f8
Browse files Browse the repository at this point in the history
  • Loading branch information
mamboer committed Sep 28, 2016
2 parents f1977f8 + 4c46820 commit bc40cfe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ module.exports = function(locals) {
var template = feedConfig.type === 'rss2' ? rss2Tmpl : atomTmpl;

var posts = locals.posts.sort('-date');
posts = posts.filter(function(post) {
return post.draft !== true;
});

if (feedConfig.limit) posts = posts.limit(feedConfig.limit);

var url = config.url;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-generator-feed",
"version": "1.2.0",
"version": "1.2.1",
"description": "Feed generator plugin for Hexo",
"main": "index",
"scripts": {
Expand Down

0 comments on commit bc40cfe

Please sign in to comment.