summaryrefslogtreecommitdiff
path: root/bin/index.md.erb
diff options
context:
space:
mode:
Diffstat (limited to 'bin/index.md.erb')
-rw-r--r--bin/index.md.erb7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/index.md.erb b/bin/index.md.erb
index 05ec43f..a3ec547 100644
--- a/bin/index.md.erb
+++ b/bin/index.md.erb
@@ -3,5 +3,10 @@ title: "<%= @title %>"
class: "index"
---
-<% @pages.sort_by{|a|a.published}.reverse.each do |a| %>
+<% @sections.keys.sort.each do |path| %>
+<% unless path.empty? %>## [<%= @sections[path]['head'] %>](<%= path %>)<% end %>
+
+<% @sections[path]['body'].sort_by{|a|a.published}.reverse.each do |a| %>
* <span><a <% if a.is_a?(ExternPage) %>class="external" <% end %>href="<%= @url.route_to(a.url) %>" title="Published on <%= a.published.strftime('%Y-%m-%d') %><% if a.updated != a.published %> (updated on<%= a.updated.strftime('%Y-%m-%d') %>)<% end %>"><%= a.title %></a></span><span><% a.tags.each do |t| %><%= t.html %><% end %></span><% end %>
+
+<% end %>