mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
cc4a9ce0a78b0eb1e3eee30c2f91344917a79fdd
* feat!: drop TagImplOptions in favor of Tag classes (#839) Remove tag-options-adapter and the registerTag object-literal overload. Custom tags must extend Tag. Co-authored-by: Cursor <[email protected]> * test: drop TagImplOptions-specific e2e coverage (#839) Remove #570 v9 object-literal registration test and unused metadata_file setup in #573. Co-authored-by: Cursor <[email protected]> * test: use inline Tag classes in register-tags spec Co-authored-by: Cursor <[email protected]> * test: remove dead throwingTag setup and duplicate throw stub for.spec kept throwingTag registration after #713 removed its test. Reuse ThrowingTag in liquid.spec instead of IntendedRenderErrorTag. Co-authored-by: Cursor <[email protected]> * test: remove dead throwingTag setup and duplicate throw stub for.spec kept throwingTag registration after #713 removed its test. Reuse ThrowingTag in liquid.spec instead of IntendedRenderErrorTag. Co-authored-by: Cursor <[email protected]> * fix(demo): ignore killall exit when express server already stopped Co-authored-by: Cursor <[email protected]> * fix(demo): revert unrelated return->exit change in express test Co-authored-by: Cursor <[email protected]> * fix(demo): use exit in express test script (no enclosing function) Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: Cursor <[email protected]>
LiquidJS
A simple, expressive, extensible Liquid template engine for JavaScript — Shopify, Jekyll and GitHub Pages compatible, for Node.js, browsers, and the CLI, with TypeScript support.
Documentation · Playground · Setup guide · Contributing
Try the online playground.
Quick start
import { Liquid } from 'liquidjs'
const engine = new Liquid()
const html = await engine.parseAndRender(
'Hello, {{ name | capitalize }}!',
{ name: 'liquid' }
)
//=> 'Hello, Liquid!'
Installation
Node.js
npm install liquidjs
Browser (jsDelivr UMD bundle)
<script src="https://cdn.jsdelivr.net/npm/liquidjs/dist/liquid.browser.min.js"></script>
CLI
npx liquidjs --template 'Hello, {{ name }}!' --context '{"name": "Liquid"}'
See the setup guide for partials, layouts, caching, and other options.
Used by
Products and projects running on LiquidJS. Open a PR to add yours.
Financial Support
If you personally love LiquidJS or it's benefiting your business, please consider financially support us via GitHub Sponsors. Special thanks to our sponsors!
Contributors ✨
Want to contribute? see Contribution Guidelines. Thanks goes to these wonderful people:
License
Languages
TypeScript
94.8%
JavaScript
3.8%
Liquid
0.7%
SWIG
0.3%
Handlebars
0.3%




