• Safe Rendering

    Liquid templates are highly readable and fault-tolerant thus suitable for designers and customers. Operators and expressions are parsed to AST and no eval or new Function are used.

  • Pure JavaScript

    Written with pure JavaScript with no native bindings, available in both Node.js and browsers. All of the CMD, ESM and CJS bundles are available on CDN.

  • Shopify Compatible

    All filters and tags from Ruby shopify/liquid are supported by LiquidJS. Jekyll sites, GitHub Pages and Shopify templates can be ported to Node.js without pain.

  • TypeScript Strict

    The whole repo is re-written in TypeScript strict mode to ensure a smooth experience using this lib and the document is precise and always up to date.

import { Liquid } from 'liquidjs'
const engine = new Liquid()
const tpl = engine.parse('Welcome to {{v}}!')
engine.render(tpl, {v: "Liquid"}).then(console.log)
// Outputs "Welcome to Liquid!"

Contributors

LiquidJS follows the all-contributors specification, see guidelines here! Thanks goes to these wonderful people:

Jun Yang chenos Zach Leatherman Tim Hardy Paul Robert Lloyd Alec Larson Patrick Malouin jaswrks 三三 ssendev wojtask9 Andrew Barclay Cory Mawhorter Mehdi Jaffery Robin Bijlani Ryan Kennedy Sami Kukkonen Scott Santucci Steven azu Joonas Jamel A. Brandon Pittman tgrandgent Martin Schuster Ray Cristofer Gonzales Raymond Camden Steve Stedman Anthony Ciccarello Bogdan Chadkin Tejas Manohar Peter deHaan amit777 Steffen Schuldenzucker Pixcell Jason Etcovitch ZC Memmie Lenglet ilhamdev0 一饮一啄皆是人生 Amit Agarwal Laurin Quast Matt Vague Liam Bigelow Jason Kurian d pham (they/them) Aleksandr Hovhannisyan jg-rp Ameya Apte tbdrz Santi Albo Yahang Wu hongl zxx-457 prassie Slav Ivanov Daniel Rosenberg bobgubko BaNgan Mahyar Pasarzangene Tomáš Hübelbauer Jason Garber Nick Reilingh Francisco Soto David LJ Rasmus Wriedt Larsen Bruno Carvalho 傅鹏 Joel Hamilton Max Medve Cosmin Popovici Adam Tanner Guillermo Casal Caro Josh Soref Koen Matthieu Bacconnier

Sponsors

If you personally love LiquidJS or it's benefiting your business, please sponsor us!

Opensense Inc. Eleventy Peter deHaan Touchless Adam Darrah Dailycontributors coni2k amit777 Khaled Salem Sentry Checkout Blocks Customer IO Emmanuel Cartelli Microsoft PakStyle.pk Syntax Podcast Cartelli Emmanuel