Skip to content

Commit

Permalink
Fix the articles sorting in feed.xml.
Browse files Browse the repository at this point in the history
The articles in feed.xml was ordered by creation date. Now it is ordered by the article's date meta.

Signed-off-by: Thomas Seng Hin Mak <makzan@gmail.com>
  • Loading branch information
Thomas Seng Hin Mak committed Sep 14, 2012
1 parent f6801e7 commit 08d503b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/blog/templates/feed.jade
Expand Up @@ -4,8 +4,8 @@ rss(version='2.0',
xmlns:wfw='http://wellformedweb.org/CommentAPI/',
xmlns:dc='http://purl.org/dc/elements/1.1/'
xmlns:atom='http://www.w3.org/2005/Atom')
channel
- var articles = contents.articles._.directories.map(function(item){ return item.index });
channel
- var articles = _.chain(contents.articles._.directories).map(function(item){ return item.index }).sortBy(function(item) { return -item.date }).value();
title= locals.name
atom:link(href=locals.url + '/feed.xml', rel='self', type='application/rss+xml')
link= locals.url
Expand Down

0 comments on commit 08d503b

Please sign in to comment.