Closed jasonmelgoza closed 8 years ago
No—I didn't think of doing that. Pull requests welcome!
Actually...wait, you could do it manually, by simply calling the breadcrumbs helper with separator: config[:separator]
or something. At least I think you could; does Middleman complain if you use set
with an unexpected property name in the config file? (I've never tried to do that, and am not at my personal computer right now to check.)
@marnen That's the stuff! Got this working locally like so.
# Breadcrumb separator template
@separator_template = " / "
# Activate middleman-breadcrumb gem
activate :breadcrumbs
set :separator, @separator_template
Then in our .slim
template I did this.
p = breadcrumbs(current_page.parent, separator: config[:separator])
Great. But there's no need to use an @instance variable -- a local variable, or just a plain string literal, would do.
I'll probably make this a config setting at some point -- you're right that it should be one.
Oh, also, you should normally call breadcrumbs
with current_page
as the first argument. Is there some reason you're using a different value?
Don't know. A team-mate implemented the plugin before I jumped in. I'll give those suggestions a shot though. Cheers!! 🍻
Reopening: I should still make this a real config option and have it pick up the default from there.
Working on this.
@jasonmelgoza Implemented in 0.4.0. Try it and see what you think—instructions are in the README.
@marnen Is it possible to define the
:separator
in a sites config file?