Skip to content

Using the eleventy-navigation plugin with WebC #55

Open
@edmelly

Description

@edmelly

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions