Open ahmadnassri opened 1 year ago
11ty.webc should probably be just webc there, if you're using the existing eleventy WebC plugin
will give that a shot, worth noting i followed the docs example https://www.11ty.dev/docs/languages/custom/#aliasing-an-existing-template-language
changing key: '11ty.webc'
to key: 'webc'
resulted in the following
[11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] An attempt was made to override the *already* overridden "webc" template syntax via the `addExtension` configuration API. A maximum of one override is currently supported. If you’re trying to add an alias to an existing syntax, make sure only the `key` property is present in the addExtension options object. (via Error)
the following however, worked:
config.addExtension(['webc'], {
key: 'html'
})
I'm confused by this API ... shouldn't the first parameter of the addExtension
call be an array of aliases to make to the one declared in key
?
seems like it's behaving backwards? or am I mis-reading the docs?
Looks like this feature only works with core template syntaxes: md, html, njk, liquid, and 11ty.js. Gonna file it as a bug.
Operating system
Linux / Debian
Eleventy
2.0.0
Describe the bug
attempting to use
.html
file extension for.webc
files with the new aliasing feature in 2.0no success.
Reproduction steps
config.addExtension("11ty.html", { key: "11ty.webc" })
.webc
component to.html
npx @11ty/eleventy --serve
Expected behavior
aliasing
.webc
components should work across all files (components / pages / layouts / etc ...).Reproduction URL
No response
Screenshots
No response