Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/tmtk75/jekyll into tmtk75…
Browse files Browse the repository at this point in the history
…-master
  • Loading branch information
mojombo committed Jan 22, 2012
2 parents 8d48992 + 76fa7f0 commit d00bc8e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/jekyll/site.rb
Expand Up @@ -174,7 +174,10 @@ def read_posts(dir)
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.
Expand Down

0 comments on commit d00bc8e

Please sign in to comment.