You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to create a paginated WebC page template based on data (like https://www.11ty.dev/docs/pages-from-data/). The paginated data is being generated in a custom JS file in my _data folder such that I have access to data called components.components. My front matter in the WebC page template is:
Currently, that page template is completely ignored, no errors but also no pages generated. When I remove permalink I start to get pages but they're in the dist folder as dist/design-system/components-full-pages/1/index.html, dist/design-system/components-full-pages/2/index.html, etc.
So I know the data is working and the pages are getting generated, there's just something wrong with the permalink syntax. I've also tried many other formats I found in the Github issues comments from #42 (comment) and #36 (comment) to no avail. Including:
Everything I've tried either silently fails or gives me the duplicate output conflict error like this one
Output conflict: multiple input files are writing to `dist/design-system/components/full/index.html`. Use distinct `permalink` values to resolve this conflict.
Debugging
After stepping away for a bit and coming back to try again, I tried to dig in a little deeper by debugging (both with IDE debugger and the 11ty debugger mode on). I converted my template from WebC to Nunjucks so I could compare the same thing with two different template languages. Results below
I don't have enough context of all the internals but my theory is that evaluatedString linked below should be returning just the permalink string but is returning an object with the string under returns as well as another context object.
So the parser doesn't know what to do with it and moves on silently with a final debug output of
Eleventy:Template Template not written false from './src/design-system/components-full-pages.webc' (via serverless permalink). +104ms
Eleventy:Template Template not written false from './src/design-system/components-full-pages.webc' (via serverless permalink). +0ms
Eleventy:Template Template not written false from './src/design-system/components-full-pages.webc' (via serverless permalink). +0ms
The text was updated successfully, but these errors were encountered:
@stevenwoodson i think you are right - i dug around more and after some superficial testing and logging i used pnpm patch to only return the nested prop evaluatedString.returns there and now all of my files are being written. nothing broke as far as i can tell.
since the whole package is apparently being pulled into @11ty/eleventy (and also i don't know about further repercussions) i didn't create a PR.
(Originally posted in help on Discord @ https://discord.com/channels/741017160297611315/1129393478963568702)
Scenario
I'm running 11ty 2.0.1 and WebC 0.11.1.
I'm attempting to create a paginated WebC page template based on data (like https://www.11ty.dev/docs/pages-from-data/). The paginated data is being generated in a custom JS file in my _data folder such that I have access to data called
components.components. My front matter in the WebC page template is:Problem
Currently, that page template is completely ignored, no errors but also no pages generated. When I remove permalink I start to get pages but they're in the dist folder as
dist/design-system/components-full-pages/1/index.html,dist/design-system/components-full-pages/2/index.html, etc.So I know the data is working and the pages are getting generated, there's just something wrong with the permalink syntax. I've also tried many other formats I found in the Github issues comments from #42 (comment) and #36 (comment) to no avail. Including:
and even
Everything I've tried either silently fails or gives me the duplicate output conflict error like this one
Debugging
After stepping away for a bit and coming back to try again, I tried to dig in a little deeper by debugging (both with IDE debugger and the 11ty debugger mode on). I converted my template from WebC to Nunjucks so I could compare the same thing with two different template languages. Results below
Nunjucks successful template debug output
WebC failed template debug output
Theory
I don't have enough context of all the internals but my theory is that
evaluatedStringlinked below should be returning just the permalink string but is returning an object with the string underreturnsas well as anothercontextobject.eleventy-plugin-webc/src/eleventyWebcTemplate.js
Line 87 in 47bfcd1
So the parser doesn't know what to do with it and moves on silently with a final debug output of
The text was updated successfully, but these errors were encountered: