<% @str = "" @i = 0 def create_nav(h,path="") return if h == nil h.each do |k,v| @i += 1 if k.end_with?(".md") || k.end_with?(".MD") || k.end_with?(".markdown") || k.end_with?(".mdown") html_path = k.gsub(/.md|.MD|.markdown|.mdown/, '.html') @str << "" else ## Accordion Header @str << "
#{k}
" create_nav(v, "#{path}/#{k}") if v != nil && v.is_a?(Hash) ## End Accordion Header @str << "
" end end end %>
">