Skip to content

Commit

Permalink
feat: Sort software/specs by last update, desc.
Browse files Browse the repository at this point in the history
(#42)
  • Loading branch information
strogonoff committed Oct 30, 2018
1 parent c1d7ddf commit ce3a940
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/jekyll-theme-open-project-helpers/filterable_index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ def get_all_items(site, collection_name, filter_func)
filter_func.call(item)
}

items.sort! { |i1, i2|
(i2.data['last_update'] <=> i1.data['last_update']) || 0
}

if site.config['is_hub']
items.map! do |item|
project_name = item.url.split('/')[2]
Expand Down

0 comments on commit ce3a940

Please sign in to comment.