middleman-template/source/layouts/_aside.html.haml

22 lines
582 B
Plaintext

._aside
%aside#navigation
- unless current_page.data.nonav
= partial 'layouts/nav'
-#
%h2 Recent Articles
%ol
- blog.articles[0...10].each do |article|
%li
= link_to article.title, article
%span= article.date.strftime '%b %e'
%h2 Tags
%ol
- blog.tags.each do |tag, articles|
%li= link_to "#{tag} (#{articles.size})", tag_path(tag)
%h2 By Year
%ol
- blog.articles.group_by {|a| a.date.year }.each do |year, articles|
%li= link_to "#{year} (#{articles.size})", blog_year_path(year)