liquidjs
liquidjs copied to clipboard
A simple, expressive, safe and Shopify compatible template engine in pure JavaScript.
First of all thanks for creating and maintaining LiquidJS. I needed a white space sensitive generic templating language that is not tied to HTML and LiquidJS does exactly that. Now...
### Summary The ESM bundle still targets ES5, which was released in _2009_. As far as I can tell, ESM itself was introduced in 2015, so the bundle should really...
Hello. I need to parse all outputs from template. ``` {{bucket}} {% for product in products %} {{ product.name }} ads {% endfor %} ``` So I want to get...
Is there a way to get an array of all tokens? Currently I've got the following code: ```js const tokens = new Tokenizer(str).readTopLevelTokens(); ``` This gives the top-level `Tag`, `Output`,...
Support for all built-in Jekyll filters: slugify, number_of_words, date_to_xmlschema, date_to_rfc822
liquidjs is "missing" a couple Jekyll-specific filters: - slugify - number_of_words - date_to_xmlschema - date_to_rfc822 https://jekyllrb.com/docs/liquid/filters Would you be willing to include them as part of Liquidjs? If so, I'll...
`where` filter in Liquidjs is not compatible with Jekyll syntax. This is a reimplemented version of `where` that works the same as Jekyll: ```js engine.registerFilter('where', function (input, property, value) {...
Hi, This library support promises in context, however, this support seems to be missing when evaluating an expression ``` engine .parseAndRender('{%if name== blank %}it is promise, not blank!{%endif%}', {name: Promise.resolve('alice')})...
Hi! 👋 This seems like a great library. We're using liquid-ruby for our customers to be able to customize some of their templates. We want to use liquidjs to do...
Test case: https://liquidjs.com/playground.html#e3sgIm9uZSB0d28gdGhyZWUiIHwgdHJ1bmNhdGV3b3JkczowIH19,e30= `{{ "one two three" | truncatewords:0 }}` should return `"one..."` Source: https://github.com/Shopify/liquid/blob/81f44e36be5f2110c26b6532fd4ccd22edaf59f2/lib/liquid/standardfilters.rb#L237 https://github.com/Shopify/liquid/blob/ff1c35b986451cca14d9da9b2ef772cbc9c65b24/test/integration/standard_filter_test.rb#L229
Two arrays with the same elements compare equal with an `if` tag and the `==` oprator, but not within a `case` / `when` block. ```liquid {% assign x = "a,b,c"...