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
Describe the bug
I'm seeing the following error when I try and set both the templateEngineOverride and a permalink() function in the data() method of an *.11ty.js template:
$ npx eleventy
Problem writing Eleventy templates: (more in DEBUG output)
> Having trouble rendering md template ./src/posts/post-8.11ty.js
`TemplateContentRenderError` was thrown
> Having trouble compiling template ./src/posts/post-8.11ty.js
`TemplateContentCompileError` was thrown
> illegal input
`AssertionError` was thrown:
AssertionError: illegal input
at assert (/Volumes/Dev/github/pdehaan/11ty-setQuietMode-test/node_modules/liquidjs/dist/liquid.common.js:1062:11)
at parse (/Volumes/Dev/github/pdehaan/11ty-setQuietMode-test/node_modules/liquidjs/dist/liquid.common.js:1426:3)
at Object.parse$$1 [as parse] (/Volumes/Dev/github/pdehaan/11ty-setQuietMode-test/node_modules/liquidjs/dist/liquid.common.js:3419:18)
at Liquid.compile (/Volumes/Dev/github/pdehaan/11ty-setQuietMode-test/node_modules/@11ty/eleventy/src/Engines/Liquid.js:181:29)
at Markdown.compile (/Volumes/Dev/github/pdehaan/11ty-setQuietMode-test/node_modules/@11ty/eleventy/src/Engines/Markdown.js:63:25)
at TemplateRender.getCompiledTemplate (/Volumes/Dev/github/pdehaan/11ty-setQuietMode-test/node_modules/@11ty/eleventy/src/TemplateRender.js:192:26)
at Template.compile (/Volumes/Dev/github/pdehaan/11ty-setQuietMode-test/node_modules/@11ty/eleventy/src/TemplateContent.js:167:42)
at async Template.render (/Volumes/Dev/github/pdehaan/11ty-setQuietMode-test/node_modules/@11ty/eleventy/src/TemplateContent.js:181:16)
at async Template._getLink (/Volumes/Dev/github/pdehaan/11ty-setQuietMode-test/node_modules/@11ty/eleventy/src/Template.js:103:26)
at async Template.getOutputHref (/Volumes/Dev/github/pdehaan/11ty-setQuietMode-test/node_modules/@11ty/eleventy/src/Template.js:138:16)
Wrote 0 files in 0.16 seconds (v0.10.0)
To Reproduce
Steps to reproduce the behavior:
// src/pages/post-8.11ty.jsclassTest{data(){return{name: "markdown",templateEngineOverride: "11ty.js,md",permalink: data=>"/aboot/youu/"};}render(data){return`# This is ${data.name}`;}}module.exports=Test;
What's interesting is, the code seems to work if I omit either templateEngineOverride value or permalink() method, but fails when I use them both. Also interesting is that if I use the static value for a permalink, it seems to work:
permalink: "/about/you/"
Expected behavior
A clear and concise description of what you expected to happen.
Environment:
OS and Version: macOS (latest)
Eleventy Version: (v0.10.0)
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm seeing the following error when I try and set both the
templateEngineOverride
and apermalink()
function in thedata()
method of an*.11ty.js
template:To Reproduce
Steps to reproduce the behavior:
What's interesting is, the code seems to work if I omit either
templateEngineOverride
value orpermalink()
method, but fails when I use them both. Also interesting is that if I use the static value for a permalink, it seems to work:Expected behavior
A clear and concise description of what you expected to happen.
Environment:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: