mirror of
https://github.com/harttle/liquidjs.git
synced 2026-10-03 00:55:13 -07:00
8aace78beb4c6b67ec1cc10cf519c82d5ffa6f3f
The browser base64Encode spread every UTF-8 byte of its input into a
single String.fromCharCode call, one argument per byte, so input past
the engine's argument limit threw: past ~125 KB on V8 ("Maximum call
stack size exceeded") and past 64 KB on engines that cap arguments at
65535, such as QuickJS. It now converts the bytes in 32 KB chunks. The
node build, which encodes with Buffer, is unchanged.
Fixes #967
Co-authored-by: Claude Opus 5.5 (1M context) <[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.9%
JavaScript
3.7%
Liquid
0.7%
SWIG
0.3%
Handlebars
0.3%




