Multi-level menu

Is there a way to generate a multi-level menu with Middleman?

I am just getting use to Ruby and using Static Site Generators, I have tried Docpad and really liked how it was able to generate Menu’s but ultimatly I prefer Middleman it just feels a bit better suited to the way I work. But I would really love if I could generate menus specifically multi-level menus.

Can anyone point me in the right direction?

Have a look at simple-navigation, https://github.com/andi/simple-navigation/wiki

It is Sinatra-compatible, so it should be possible to adapt to Middleman.

I had a look and I couldn’t seem to get it to work (I’m not exactly a Ruby wizz) But I also had a look at middleman-navigation which looked great on the outside but then when I tried to add it apparently it conflicts with middleman 3 so that was a no go as again I couldn’t figure that out.

I then stumbled apon this http://middlemanapp.com/advanced/sitemap/ which at first glance appears to be the more modern dare I say ‘correct’??? way of doing this but really I can’t make heads or tails of where to stat with this as it’s not exactly easy to follow for newbies if fact it’s plain confusing.

I really like the simplicity of doing this in Docpad and it’s proving a bit of a headache in middleman I am sure I am missing something really easy and it’s not actually a big deal clearly from the murmors on google people are doing it just know one is letting on as to how.

You can see an example of navigation in some of the tests: https://github.com/middleman/middleman/blob/master/middleman-core/fixtures/traversal-app/source/layout.erb

Basically, you know the current_page and you can inspect its children and siblings.

I know many people have written sitemaps and navigation in Middleman, maybe some of them would be willing to open source that code into a community extension.