Any defines in a Beeswax template get moved to the top of the apply-template function that Beeswax wraps around the template. It so happens that the place they get put is outside the scope of the parameterize that sets the value of the current-pagetree and current-metas. (See these lines in the expander.) So any definitions that depend, directly or indirectly, on those two parameters will receive incorrect values.
Any
define
s in a Beeswax template get moved to the top of theapply-template
function that Beeswax wraps around the template. It so happens that the place they get put is outside the scope of theparameterize
that sets the value of thecurrent-pagetree
andcurrent-metas
. (See these lines in the expander.) So any definitions that depend, directly or indirectly, on those two parameters will receive incorrect values.Surfaced by @benknoble in follow-up for #12.