Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Syntax Additions to Increase Overlap with Django Template Language #1265

Open
fer-rum opened this issue Jul 13, 2020 · 0 comments

Comments

@fer-rum
Copy link

fer-rum commented Jul 13, 2020

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 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant