https://github.com/harttle/liquidjs
A simple, expressive, safe and Shopify compatible template engine in pure JavaScript.
https://github.com/harttle/liquidjs
browser liquid nodejs template-engine
Last synced: 6 months ago
JSON representation
A simple, expressive, safe and Shopify compatible template engine in pure JavaScript.
- Host: GitHub
- URL: https://github.com/harttle/liquidjs
- Owner: harttle
- License: mit
- Created: 2016-06-13T07:39:30.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2025-04-03T13:28:56.000Z (7 months ago)
- Last Synced: 2025-05-08T17:07:48.528Z (6 months ago)
- Topics: browser, liquid, nodejs, template-engine
- Language: TypeScript
- Homepage: https://liquidjs.com
- Size: 47.3 MB
- Stars: 1,637
- Watchers: 25
- Forks: 240
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-list - liquidjs
- jimsghstars - harttle/liquidjs - A simple, expressive, safe and Shopify compatible template engine in pure JavaScript. (TypeScript)
README
# liquidjs
[](https://www.npmjs.org/package/liquidjs)
[](https://www.npmjs.org/package/liquidjs)
[](https://coveralls.io/github/harttle/liquidjs?branch=master)
[](https://github.com/harttle/liquidjs/actions/workflows/ci-build.yml?query=branch%3Amaster)
[](https://github.com/harttle/liquidjs/blob/master/LICENSE)
[](https://github.com/harttle/liquidjs)
A simple, expressive and safe [Shopify][shopify/liquid] / 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](https://jekyllrb.com), [GitHub Pages](https://pages.github.com/) and [Shopify templates](https://themes.shopify.com/) can be ported to Node.js without pain.
* [Documentation][doc]
* Please star [LiquidJS on GitHub][github]!
* Financial support via [GitHub Sponsors](https://github.com/sponsors/harttle).
## What's it like?
Basically there're two types of Liquid syntax: tags enclosed by `{% %}` and outputs enclosed by `{{ }}`. A Liquid template looks like:
```liquid
{% if username %}
{{ username | append: ", welcome to LiquidJS!" | capitalize }}
{% endif %}
```
[A live demo](https://liquidjs.com/playground.html) is also available and here's a [quick tutorial](https://liquidjs.com/tutorials/intro-to-liquid.html) for Liquid syntax.
## Installation
Install from npm in Node.js:
```bash
npm install liquidjs
```
Or use the UMD bundle from jsDelivr:
```html
```
Or render directly from CLI using npx:
```bash
npx liquidjs --template 'Hello, {{ name }}!' --context '{"name": "Snake"}'
```
For more details, refer to the [Setup Guide][setup].
## Who's Using LiquidJS?
- [Eleventy](https://www.11ty.dev/): Eleventy, a simpler static site generator.
- [Opensense](https://www.opensense.com/): The smarter way to send email.
- [Directus](https://docs.directus.io/): an instant REST+GraphQL API and intuitive no-code data collaboration app for any SQL database.
- [Semgrep](https://github.com/returntocorp/semgrep): Lightweight static analysis for many languages.
- [Rock](https://www.rockrms.com/): An open source CMS, Relationship Management System (RMS) and Church Management System (ChMS) all rolled into one.
- [Mitosis](https://github.com/BuilderIO/mitosis): Write components once, run everywhere. Compiles to React, Vue, Qwik, Solid, Angular, Svelte, and more.
- [Pattern Lab](https://patternlab.io/): a frontend workshop environment that helps you build, view, test, and showcase your design system's UI components.
- [Builder.io](https://www.builder.io/m/developers): the first and only headless CMS with a visual editor that lets you drag and drop with your components, directly within your current site or app. Completely API-driven, for cleaner code and simpler workflows.
- [Microsoft Power Pages](https://learn.microsoft.com/en-us/power-pages/introduction): a secure, enterprise-grade, low-code software as a service (SaaS) platform for creating, hosting, and administering modern external-facing business websites.
- [Azure API Management developer portal](https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-developer-portal): an automatically generated, fully customizable website with the documentation of your APIs.
- [WISMOlabs](https://wismolabs.com/): Post Purchase Experience platform for eCommerce retailers enhancing customer satisfaction by using LiquidJS to provide customizable post-purchase experiences through programmable email, SMS, order tracking pages, and webhooks.
Feel free to create a PR or contact me to add your use case into this list!
## Financial Support
If you personally love LiquidJS or it's benefiting your business, please consider financially support us via [GitHub Sponsors](https://github.com/sponsors/harttle). Special thanks to our sponsors!

Opensense

Eleventy

Peter deHaan

Touchless

Dropkiq

Dailycontributors

Serkan Holat

amit777

Khaled Salem

Sentry

Checkout Blocks

Customer IO

Emmanuel Cartelli

Microsoft

PakStyle.pk

Syntax Podcast

Cartelli Emmanuel

EscortA.com

Chudovo
## Contributors โจ
Want to contribute? see [Contribution Guidelines][contribution]. 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
๐

Tim van Dam
๐ป

Ed Hanton
๐
[shopify/liquid]: https://shopify.github.io/liquid/
[plugins]: https://liquidjs.com/tutorials/plugins.html#Plugin-List
[setup]: https://liquidjs.com/tutorials/setup.html
[doc]: https://liquidjs.com
[github]: https://github.com/harttle/liquidjs
[oc]: https://opencollective.com/liquidjs/
[contribution]: https://liquidjs.com/tutorials/contribution-guidelines.html