A simple, expressive, safe and Shopify compatible template engine in pure JavaScript
open sourceMITself-hostablefree
LiquidJS is a Liquid template engine for JavaScript, compatible with Shopify, Jekyll and GitHub Pages templates, that runs in Node.js, in browsers and from the command line, with TypeScript types. It renders the same {{ }} and {% %} syntax as Ruby's Liquid, with partials, layouts and caching, and can be extended with custom tags and filters. It's the usual way to render Liquid templates outside Ruby, for example to preview in the browser what a Ruby server will render.
Problems it solves
- let customers edit their own email or page templates without running code on our server
- a safe template language for templates stored in the database
- render Shopify Liquid templates in Node.js
- preview a Liquid template in the browser exactly as the server will render it
- render Jekyll-style templates from JavaScript
- a template engine for JavaScript that doesn't allow arbitrary code
- render a template from the command line with JSON data
Features
- Shopify, Jekyll and GitHub Pages compatible
- Node.js, browser and CLI
- TypeScript types
- partials and layouts
- template caching
- custom tags and filters
- online playground
Capabilities
| Has a command line tool | plan not known |
|---|---|
| Takes plugins | plan not known |
Alternatives
The same job
These do what LiquidJS does.
- Liquid Safe, customer facing template language for flexible web apps
