Closed cfjedimaster closed 1 year ago
Fwiw, a few things here:
webc:type="11ty"
doesn’t export any data or variables—it’s merely to render template syntax. You can define variables in there for use in the same webc:type="11ty"
template node, but those are locally scoped.javascript
in front matter.This is an automated message to let you know that a helpful response was posted to your issue and for the health of the repository issue tracker the issue will be closed. This is to help alleviate issues hanging open waiting for a response from the original poster.
If the response works to solve your problem—great! But if you’re still having problems, do not let the issue’s closing deter you if you have additional questions! Post another comment and we will reopen the issue. Thanks!
Consider the following where I define a page level variable in EJS -
Should I be able to access this in a webc file? I tried this:
And nothing seemed to work, but it could be that
name
is scoped to the template block and not used again. FYI, I realize I could just output from my EJS block, but was curious if I could use EJS to do computation type stuff, and 'regular' webc code output for the rest of the template.As an aside (and if this should be a second issue, let me know). In the same file, I tried this on top:
and the front matter wasn't parsed at all.