marnen / middleman-breadcrumbs

Breadcrumbs helper for Middleman (http://www.middlemanapp.com)
MIT License
11 stars 12 forks source link

Is this only working within a blog context? #15

Open iwarner opened 7 years ago

marnen commented 7 years ago

Can you give more detail to your question?

iwarner commented 7 years ago

Hiya

So I have a blog with links as such - and the category also being a collection. blog.permalink = "{category}/{title}.html"

When using your breadcrumbs I get -

BLOGTITLE

What I expected was

Crumbs = Link to Cat || BLOGTITLE

marnen commented 7 years ago

Hmm. Are you using middleman-blog? I've never used that extension and know nothing about it, but it's possible that some of the comments on #7 might be relevant.

In particular, note @Jeeppler's statement in https://github.com/marnen/middleman-breadcrumbs/issues/7#issuecomment-200426254:

First the problem is that middleman-blog tag pages don't have parent elements.

There is a workaround offered in that comment, for whatever it's worth. :)

If it is true that middleman-blog tag pages don't have parent elements, then the breadcrumbs plugin will not work out of the box, because it uses the parent element to build the breadcrumbs hierarchy.

I would be happy to make middleman-breadcrumbs work with middleman-blog if we could figure out a logical way of doing so. How would you like it to behave?

iwarner commented 7 years ago

Hiya

Yeah just coming to this conclusion now - that there are no parent resource defined, probably because they are proxied after the sitemap creation perhaps?

Noticed this with blog collections also, and then referencing a collection in the url, gonna get messy.

My older attempt was simply to parse the URL string: but has issues with directory indexes on and off that I need to fix - maybe the best solution in this case though

https://github.com/iwarner/CodeBlender-Middleman/blob/master/source/molecule/breadcrumb/_breadcrumb.haml

http://codeblender.net/molecule/breadcrumb/breadcrumb.html

Will play some more and look at his link you sent

marnen commented 7 years ago

OK. If there are modifications you'd like in the breadcrumbs gem to make this work better, please tell me what they are (or make a pull request).