Skip to content

Commit

Permalink
Don’t list articles without a template
Browse files Browse the repository at this point in the history
Closes #250
  • Loading branch information
jnordberg committed Jun 29, 2014
1 parent 43a30af commit c3705fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/blog/plugins/paginator.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ module.exports = (env, callback) ->
# helper that returns a list of articles found in *contents*
# note that each article is assumed to have its own directory in the articles directory
articles = contents[options.articles]._.directories.map (item) -> item.index
# skip articles that does not have a template associated
articles = articles.filter (item) -> item.template isnt 'none'
# sort article by date
articles.sort (a, b) -> b.date - a.date
return articles

Expand Down

0 comments on commit c3705fe

Please sign in to comment.