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 tried accessing the built-in content variable in webc:setup, which stores the contents of the template for some manipulation/transformation, and got unexpected behavior.
---
layout: base.webc
---
<scriptwebc:setup>// some content processing, wrapping with <article> just for exampleconstprocessedContent=`<article>${content}</article>`;// for a.md the content should be <h1>A content</h1>// for b.md the content should be <h1>B content</h1>// But for b.md the content is actually <h1>A Content</h1></script><divclass="some-wrapper"><slot@raw="processedContent"></slot></div>
I tried accessing the built-in
content
variable inwebc:setup
, which stores the contents of the template for some manipulation/transformation, and got unexpected behavior.I have this structure:
base.webc
child.webc
a.md
b.md
eleventy.config.js
But after build I have the same content for both templates:
_site/a/index.html
_site/b/index.html
It looks like the
content
variable is cached and uses the content of the first template every time.Windows 10
11ty/[email protected]
11ty/[email protected]
Test repo
The text was updated successfully, but these errors were encountered: