Can't use locals defined in posthtml-expressions inside the layout #384
Answered
by
cossssmin
thewebartisan7
asked this question in
Q&A
-
It take me time to understand this, and I would like to know if this is how is designed or an issue. Supposing we have defined locals via plugin expressions: require("posthtml-expressions")({
locals: {
foo: 'bar'
},
}), I can use foo inside any pages but not inside a layout (a file that it's used to be extended using posthtml-extend. I need to define again foo inside posthtml-extend like this: require("posthtml-extend")({
locals: {
foo: 'bar'
},
}), Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
cossssmin
Oct 2, 2022
Replies: 1 comment 1 reply
-
You need to pass |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
thewebartisan7
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to pass
posthtml-expressions
as a plugin toposthtml-extend
:https://github.com/posthtml/posthtml-extend#plugins