Merge branch 'master' of https://github.com/tmtk75/jekyll into tmtk75-master

This commit is contained in:
Tom Preston-Werner 2012-01-21 19:49:08 -08:00
commit d00bc8e8fe
1 changed files with 4 additions and 1 deletions

View File

@ -174,7 +174,10 @@ module Jekyll
self.posts.sort!
# limit the posts if :limit_posts option is set
self.posts = self.posts[-limit_posts, limit_posts] if limit_posts
if limit_posts
limit = self.posts.length < limit_posts ? self.posts.length : limit_posts
self.posts = self.posts[-limit, limit]
end
end
# Run each of the Generators.