11ty/eleventy-navigation

Breadcrumbs return no data

simplerethink opened this issue ยท 5 comments

Could someone explain why I don't get any data for breadcrumbs?

---
eleventyNavigation:
  key: My Page Title
  parent: myParentKey
---
{% set crumbs = collections.all | eleventyNavigationBreadcrumb(eleventyNavigation.key) %}
{% for crumb in crumbs %}
  <a class="crumb" href="{{ crumb.url | url }}">{{ crumb.title }}</a>
  ...
{% endfor %}

I think this is working for me in https://github.com/pdehaan/11ty-nav-48

The homepage has no breadcrumbs, but if you look at www/pages/index.html, you should see:

<a class="crumb" href="/">myParentKey</a>

@pdehaan thank you! I'll do some more digging. I keep getting [ ] even for nested pages within my site.

@simplerethink i can confirm i get the same empty array []. I'm using version 2.0.1

Chiming in to say that I'm getting the same empty array, both in a personal site, and on the test repository from @pdehaan. I'm also running version 2.0.1.