summaryrefslogtreecommitdiff
path: root/tmpl/index.md.erb
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-01-06 19:50:45 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-01-06 19:50:45 -0500
commit7edb003cd1c9b53ffdff11ef85532e39f08db16d (patch)
tree180db82a4af7720508ae2732393401bf4d27cadf /tmpl/index.md.erb
parent7d875df65221d4da91953cf129a03e76fe8e5d29 (diff)
wip
Diffstat (limited to 'tmpl/index.md.erb')
-rw-r--r--tmpl/index.md.erb12
1 files changed, 12 insertions, 0 deletions
diff --git a/tmpl/index.md.erb b/tmpl/index.md.erb
new file mode 100644
index 0000000..a3ec547
--- /dev/null
+++ b/tmpl/index.md.erb
@@ -0,0 +1,12 @@
+---
+title: "<%= @title %>"
+class: "index"
+---
+
+<% @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 %>