mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
14323803294e820d93f2c9dc06e484f69e443aa3
* feat!: remove CLI support for template via STDIN Fixes #940 Co-authored-by: Cursor <[email protected]> * feat!: take CLI template as positional argument Make template a required positional arg (drop --template) for v11 per #586; stdin template remains unsupported without a special error. Co-authored-by: Cursor <[email protected]> * fix: restore --template CLI option Revert the positional-only template change. Keep --template as the primary API; stdin template remains unsupported without a special error. Co-authored-by: Cursor <[email protected]> * fix: restore explicit @- stdin for template and context Keep @- for --template and --context; only the legacy bare-stdin-as-template fallback stays removed. Co-authored-by: Cursor <[email protected]> * feat: accept CLI template as positional or --template Support positional <template> alongside --template/-t for compatibility; error if both are set and differ. Bare stdin template remains removed; @- still works. Co-authored-by: Cursor <[email protected]> * feat!: remove --template CLI option Template is positional-only; bare stdin template and --template/-t are both removed. Keep @- for template and --context. 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 '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%




