middleman-navigation
middleman-navigation copied to clipboard
Custom classes or ids for navigation items?
Hi!
Is it possible to setup custom classes and/or ids for the genreated list items?
I found this with simple.navigation: https://github.com/codeplant/simple-navigation/wiki/FAQ#q4
That's not currently possible, but it wouldn't be hard to add. This line https://github.com/michaek/middleman-navigation/blob/master/lib/middleman-navigation/tree.rb#L46 is where we're calling .item
as in the simple-navigation example, and I'd suggest we'd allow class
and id
as keys of the navigation
configuration in the YAML frontmatter, and that class or id would be applied to the navigation item. Does that sound like it would achieve what you're looking for?
let me try this (end next week)
Awesome - let me know if you need any help. I can probably get to it too - I'll post an update here if I have a chance.