We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8008f46 commit 3c64eebCopy full SHA for 3c64eeb
layouts/default.html
@@ -205,11 +205,16 @@ <h2 class="title"><%= @item[:title] %></h2>
205
</div>
206
207
<div class="col2-1">
208
- <ul>
209
- <% @items.each do |item| %>
210
- <li><a href="<%= item.path %>"><%= item[:title] || 'Untitled' %></a></li>
211
- <% end %>
212
- </ul>
+ <ul>
+ <% @items.group_by {|item| item[:filename].split('/')[1] }.each do |section, items| %>
+ <h3><%= section.capitalize %></h3>
+ <% items.sort_by {|item| item[:title] || "" }.each do |item| %>
+ <% if item[:title] %>
213
+ <li><a href="<%= item[:path] %>"><%= item[:title] %></a></li>
214
+ <% end %>
215
216
217
+ </ul>
218
219
220
0 commit comments