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
Is your feature request related to a problem? Please describe.
I recently ran into the issue I filed here a while back: #2000.
At first I thought maybe Liquidjs had regressed, but then I saw my comment at the end noting that this was only fixed for the {% render %} tag, not for {% include %} (which is now deprecated). See comment here: harttle/liquidjs#404 (comment)
include and layout are legacy tags which does not provide Context separation. In both Shopify/Liquid and LiquidJS, {% assgin %} in {%include%} files assigns to its parent template, thus will not hide include arguments. So it's by design and that's why {%include%} tag is deprecated.
Describe the solution you'd like
If a user's template language is set to Liquid and they use {% include %}, it would be nice if we could log a warning in the server console noting that this tag is deprecated and may not behave as expected. Otherwise, a user's template may fail silently.
I'm not sure if this is actually possible, though, because 11ty doesn't know when you use a particular tag, right? That's just the template language's job.
Add a new config option in liquidjs that allows you to alias {% include %} to {% render %} under the hood. And then 11ty could set this to true by default.
Additional context
Would be happy to work on this if you think it's a worthwhile enhancement.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I recently ran into the issue I filed here a while back: #2000.
At first I thought maybe Liquidjs had regressed, but then I saw my comment at the end noting that this was only fixed for the
{% render %}
tag, not for{% include %}
(which is now deprecated). See comment here: harttle/liquidjs#404 (comment)Describe the solution you'd like
If a user's template language is set to Liquid and they use
{% include %}
, it would be nice if we could log a warning in the server console noting that this tag is deprecated and may not behave as expected. Otherwise, a user's template may fail silently.I'm not sure if this is actually possible, though, because 11ty doesn't know when you use a particular tag, right? That's just the template language's job.
Describe alternatives you've considered
{% include %}
: https://www.11ty.dev/docs/languages/liquid/#supported-features{% include %}
to{% render %}
under the hood. And then 11ty could set this totrue
by default.Additional context
Would be happy to work on this if you think it's a worthwhile enhancement.
The text was updated successfully, but these errors were encountered: