Skip to content

Commit 847b9f7

Browse files
committed
order the content folders (chapters) in the sidebar in a hand-curated sort
1 parent a151f6b commit 847b9f7

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

layouts/sidebar.html

+17-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,23 @@ <h2>Categories</h2>
55
<hr>
66

77
<ul class="nav">
8-
<% @items.group_by {|item| item[:filename].split('/')[1] }.each do |section, items| %>
9-
<% if section != "assets" && section != "dex.md" %>
10-
<li><a href="/<%= section %>"><%= section.gsub(/-/, " ").upcase %></a></li>
11-
<% end %>
8+
<% chapters = [
9+
"getting-started",
10+
"javascript-101",
11+
"jquery-basics",
12+
"using-jquery-core",
13+
"events",
14+
"effects",
15+
"ajax",
16+
"plugins",
17+
"performance",
18+
"code-organization",
19+
"custom-events",
20+
"how-to"
21+
] %>
22+
<% folders = @items.group_by {|item| item[:filename].split('/')[1] } %>
23+
<% chapters.each do |section| %>
24+
<li><a href="/<%= section %>"><%= section.gsub(/-/, " ").upcase %></a></li>
1225
<% end %>
1326
</ul>
1427
</aside>

0 commit comments

Comments
 (0)