A simple, expressive and safe Shopify / Github Pages compatible template engine in pure JavaScript. The purpose of this repo is to provide a standard Liquid implementation for the JavaScript community so that Jekyll sites, Github Pages and Shopify templates can be ported to Node.js without pain.
Basically there're two types of Liquid syntax: tags enclosed by {% %}
and outputs enclosed by {{ }}
. A Liquid template looks like:
{% if username %}
{{ username | append: ", welcome to LiquidJS!" | capitalize }}
{% endif %}
A live demo is also available and here's a quick tutorial for Liquid syntax.
Install from npm in Node.js:
npm install liquidjs
Or use the UMD bundle from jsDelivr:
<script src="https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.min.js"></script>
More details, refer to The Setup Guide.
If you love LiquidJS or your company is using LiquidJS? Please consider support us on Open Collective or Patreon.
If you personally like LiquidJS and find it's useful to you, you can become a backer!
If LiquidJS is benefiting your business/company, please sponsor us to make it better!
Want to contribute? see Contribution Guidelines. Thanks goes to these wonderful people:
Version | Tag | Published |
---|---|---|
9.37.0 | latest | 2mos ago |