Open anghelos opened 1 year ago
Possibly related to this comment in issue #32.
Adding permalink: false to a *.webc file's frontmatter data results in an error.
permalink: false
*.webc
Example
<!-- false.webc --> --- permalink: false --- <h1>This is a test</h1>
[11ty] Problem writing Eleventy templates: (more in DEBUG output) [11ty] 1. Having trouble rendering webc template ./false.webc (via TemplateContentRenderError) [11ty] 2. Cannot read properties of undefined (reading 'url') (via TypeError) [11ty] [11ty] Original error stack trace: TypeError: Cannot read properties of undefined (reading 'url') [11ty] at Object.addContent (C:\NODEJS\Eleventy\webc_test\node_modules\.pnpm\@11ty+eleventy-plugin-bundle@1.0.4\node_modules\@11ty\eleventy-plugin-bundle\eleventy.shortcodes.js:24:39) [11ty] at Object.css (C:\NODEJS\Eleventy\webc_test\node_modules\.pnpm\@11ty+eleventy@2.0.1\node_modules\@11ty\eleventy\src\BenchmarkGroup.js:32:26) [11ty] at Object.<anonymous> (C:\NODEJS\Eleventy\webc_test\node_modules\.pnpm\@11ty+eleventy-plugin-webc@0.11.1\node_modules\@11ty\eleventy-plugin-webc\src\eleventyWebcTemplate.js:155:37) [11ty] at async Template._render (C:\NODEJS\Eleventy\webc_test\node_modules\.pnpm\@11ty+eleventy@2.0.1\node_modules\@11ty\eleventy\src\TemplateContent.js:514:22) [11ty] at async Template.renderWithoutLayout (C:\NODEJS\Eleventy\webc_test\node_modules\.pnpm\@11ty+eleventy@2.0.1\node_modules\@11ty\eleventy\src\Template.js:456:27) [11ty] at async TemplateMap.populateContentDataInMap (C:\NODEJS\Eleventy\webc_test\node_modules\.pnpm\@11ty+eleventy@2.0.1\node_modules\@11ty\eleventy\src\TemplateMap.js:589:39) [11ty] at async TemplateMap.cache (C:\NODEJS\Eleventy\webc_test\node_modules\.pnpm\@11ty+eleventy@2.0.1\node_modules\@11ty\eleventy\src\TemplateMap.js:483:5) [11ty] at async TemplateWriter._createTemplateMap (C:\NODEJS\Eleventy\webc_test\node_modules\.pnpm\@11ty+eleventy@2.0.1\node_modules\@11ty\eleventy\src\TemplateWriter.js:330:5) [11ty] at async TemplateWriter.generateTemplates (C:\NODEJS\Eleventy\webc_test\node_modules\.pnpm\@11ty+eleventy@2.0.1\node_modules\@11ty\eleventy\src\TemplateWriter.js:360:5) [11ty] at async TemplateWriter.write (C:\NODEJS\Eleventy\webc_test\node_modules\.pnpm\@11ty+eleventy@2.0.1\node_modules\@11ty\eleventy\src\TemplateWriter.js:407:23) [11ty] Wrote 0 files in 0.45 seconds (v2.0.1)
This issue should be resolved with #93, as it adds a check to ensure data.page.url exists before trying to read from it.
data.page.url
Possibly related to this comment in issue #32.
Adding
permalink: false
to a*.webc
file's frontmatter data results in an error.Example