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

  • Zero Dependency

    Written with zero npm dependency and no native binding, 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}}!'))
  • const html = await engine.render(tpl, {v: "Liquid"})
  • // html === "Welcome to Liquid!"

Contributors

LiquidJS follows the all-contributors specification, see guildelines 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

Backers

Love LiquidJS and want to contribute? Become a backer. Find out more how to contribute!