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 am currently working on a set of HTML template blocks that are supposed to be used by Jekyll and Django projects alike to ensure a common corporate design.
Core Issue
While Liquid (which is in turn used by Jekyll) and the Django template language already share a wide range of common syntax and semantics, there are still some very basic elements that can not be commonly expressed in both languages with the same syntax.
Request 1: Implement the not-Operator in Liquid
This is not a new request. See #138. Since unless is not available with Django TL (and there is no reason to implement it), adding a basic boolean operator here would be a very good addition.
Request 2: Allow an Optional with in the include Tag
Consider the following:
TL
Syntax
Liquid
{% include filename param1=value1 param2=value2 … %}
Django
{% include filename with param1=value1 param2=value2 … %}
Allowing the token with after the file name would make both syntaxes compatible. By making the token optional, compatibility with existing liquid code would be maintained.
Final Remarks
The goal here is not to create a 100% overlap. The goal is to have both languages share enough common syntax so that structural template expressions can be found in a way that they can be evaluated by a Django TL and a Liquid TL processor. These two request are the only ones for which currently no expression can be found that is valid in both languages.
The text was updated successfully, but these errors were encountered:
Use Case
I am currently working on a set of HTML template blocks that are supposed to be used by Jekyll and Django projects alike to ensure a common corporate design.
Core Issue
While Liquid (which is in turn used by Jekyll) and the Django template language already share a wide range of common syntax and semantics, there are still some very basic elements that can not be commonly expressed in both languages with the same syntax.
Request 1: Implement the
not
-Operator in LiquidThis is not a new request. See #138. Since
unless
is not available with Django TL (and there is no reason to implement it), adding a basic boolean operator here would be a very good addition.Request 2: Allow an Optional
with
in the include TagConsider the following:
{% include
filename param1=value1 param2=value2 …%}
{% include
filenamewith
param1=value1 param2=value2 …%}
Allowing the token with after the file name would make both syntaxes compatible. By making the token optional, compatibility with existing liquid code would be maintained.
Final Remarks
The goal here is not to create a 100% overlap. The goal is to have both languages share enough common syntax so that structural template expressions can be found in a way that they can be evaluated by a Django TL and a Liquid TL processor. These two request are the only ones for which currently no expression can be found that is valid in both languages.
The text was updated successfully, but these errors were encountered: