Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
atarukodaka committed Feb 3, 2017
1 parent 8379af8 commit 84e9bbb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
Empty file.
3 changes: 2 additions & 1 deletion lib/middleman-akcms/directory_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ def dir_name
yml = YAML::load(config_res.render(layout: false))
name = yml["display_name"]
end
name || File.dirname(path).split("/").last
return name if name
return ((dn = File.dirname(path).split("/").last) == ".") ? nil : dn
end
end
################################################################
Expand Down
2 changes: 1 addition & 1 deletion lib/middleman-akcms/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def breadcrumb(page)
## add categories
p = page.parent
while p && p != top_page()
list.unshift(content_tag(:a, p.dir_name, href: url_for(p)))
list.unshift(content_tag(:a, p.dir_name || p.data.title, href: url_for(p)))
p = p.parent
end
list.unshift(content_tag(:a, "Home", href: url_for(top_page()))) # unless page == top_page()
Expand Down
2 changes: 1 addition & 1 deletion template/source/partials/_sidebar.erb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</aside>
<!-- ================ -->
<aside>
<h2>ARCHIVES</h2>
<h2>MONTHLY ARCHIVES</h2>
<ul>
<% akcms.archives.each {|date_ym, res|%>
<li> <%= link_to(date_ym.strftime("%b %Y"), res) %></li>
Expand Down

0 comments on commit 84e9bbb

Please sign in to comment.