Permalink
Browse files

sort items on index pages by 'section' attribute instead of alphabeti…

…cal order
  • Loading branch information...
ajpiano committed Nov 5, 2011
1 parent 847b9f7 commit 65e509113d3625564dfff7da5c8cb281fe6d456e
Showing with 1 addition and 1 deletion.
  1. +1 −1 layouts/dex.html
View
@@ -14,7 +14,7 @@ <h2 class="title"><%= @item[:title] %></h2>
<% myFolder = @item[:filename].split('/')[1] %>
<% folderItems = @items.group_by {|item| item[:filename].split('/')[1] } %>
<ul>
- <% folderItems[ myFolder ].sort_by {|item| item[:title] || "" }. each do |item| %>
+ <% folderItems[ myFolder ].sort_by {|item| item[:section] || 0 }. each do |item| %>
<% if item[:title] && !(item[:filename] =~ /\/dex\.md$/) %>
<li><a href="<%= item.path %>"><%= item[:title] %></a></li>
<% end %>

0 comments on commit 65e5091

Please sign in to comment.