mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 12:20:40 -07:00
4e31549faa343c0dcd0941ed58ae633773ba091c
Restructure the README to match common OSS conventions: tagline and badges above the fold, copy-paste Quick start, Features list, and a compact Used by section. Remove the star plea, centered logo, and per-project marketing blurbs that pushed useful content down. Co-authored-by: Cursor <[email protected]>
LiquidJS
A simple, expressive and safe Shopify Liquid template engine for JavaScript — compatible with Jekyll, GitHub Pages, and Shopify themes.
Documentation · Playground · Setup guide · Contributing
Quick start
import { Liquid } from 'liquidjs'
const engine = new Liquid()
const html = await engine.parseAndRender(
'Hello, {{ name | capitalize }}!',
{ name: 'liquid' }
)
//=> 'Hello, Liquid!'
Features
- Compatible — Shopify Liquid, Jekyll, and GitHub Pages dialects
- Safe by default —
ownPropertyOnly,memoryLimit, andrenderLimithelp sandbox untrusted templates - Runs everywhere — Node.js, browser (UMD/ESM), and CLI via
npx liquidjs - Extensible — custom tags, filters, and plugins
- Typed — TypeScript definitions included
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.
Example
Liquid templates use tags ({% %}) and outputs ({{ }}):
{% if username %}
{{ username | append: ", welcome to LiquidJS!" | capitalize }}
{% endif %}
Try it in the playground or read the Liquid syntax tutorial.
Used by
- Eleventy
- GitHub Docs
- Kibana
- Microsoft Power Pages
- Azure API Management developer portal
- Directus
- Builder.io
- Mitosis
- Pattern Lab
- Opensense
- Rock RMS
- WISMOlabs
- Freshet
Using LiquidJS in production? Open a PR to add your project.
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%




