Browse code

fixed the order of RSS items and posts on the archive page

B Mathis authored on 11/11/2009 at 23:06:42
Showing 2 changed files
... ...
@@ -4,7 +4,7 @@ title: Blog Archives
4 4
 ---
5 5
 %h2 Blog Archives
6 6
 
7
-- posts = site.posts.group_by { |p| p.date.strftime("%Y") }
7
+- posts = site.posts.reverse.group_by { |p| p.date.strftime("%Y") }
8 8
 - posts.keys.each do |year|
9 9
   %h3= year
10 10
   %ul
... ...
@@ -15,7 +15,7 @@ full_url: http://yoursite.com
15 15
   %author
16 16
     %name= page.author
17 17
     %email= page.email
18
-  - site.posts[0..14].each do |post|
18
+  - site.posts.reverse[0..14].each do |post|
19 19
     %entry
20 20
       %title= rp(post.title)
21 21
       %link(href="#{page.full_url}#{post.url}")