11ty/eleventy-navigation

Using the eleventy-navigation plugin with WebC

Opened this issue · 0 comments

If I use this js frontmatter in a .md or .njk file, the navigation item works as expected (i.e. url and key are /one and One, respectively):

---js
const permalink = "/one/";

const eleventyNavigation = {
  key: "One",
}
---

Similarly, standard frontmatter works:

---
permalink: "/one/"
eleventyNavigation: {
  key: One,
}
---

But the same thing in a .webc file doesn't work. key is found, but url is undefined.

I've created a fork of the 11ty WebC base, showing the issue. Am I missing something/do I need to treat WebC differently?

It may be a separate issue, but InputPathToUrlTransformPlugin also fails for any WebC templates.