Latest post is chosen first in related posts

This commit is contained in:
Anand Narayan
2013-07-06 15:11:52 +05:30
parent c688ee67b6
commit dfca2c6edc
2 changed files with 8 additions and 2 deletions

View File

@@ -46,7 +46,8 @@ module Jekyll
end
def most_recent_posts
(self.site.posts - [self.post])[0..9]
recent_posts = self.site.posts.reverse - [self.post]
recent_posts.first(10)
end
def display(output)