Description
Liquid is a template engine from Shopify, written for safe templates that users can edit. Its design has three requirements: markup that is simple and readable, no evaluation of code, so a template cannot run code on your server, and statelessness, so that parsing and compiling can be done once and the compiled template rendered later with a hash of local variables and objects. Those properties make it suitable for letting customers change the look of an application without giving them the ability to run insecure code, for rendering templates straight from a database, and for both HTML and email. The library is installed as a Ruby gem. Its API is built around a Template class: you parse content from a file or string, then call render with a hash of parameters. Recent versions add a concept of environments, which are scoped sets of custom tags, filters and configuration, so different parts of an application do not clash. The render! method raises on the first error instead of collecting them. The README also explains resource limits for rendering, and it links the Shopify Liquid documentation, a wiki, contributing guidelines and a version history.…
Highlights
- Safe, non-evaluating template language
- Stateless parse and render steps
- Environments for scoped tags and filters
- Resource limits for rendering
- Ruby gem with Template API
- Designed for user-editable templates
Ratings & Reviews
No ratings yet
Be the first to rate Liquid.
People also visit

liquid-theme-standards
CSS, JavaScript, and HTML coding standards for Shopify Liquid themes
Liquid FAQ
What is Liquid?
A template engine from Shopify, designed to be safe enough for users to edit their own templates.
Why is it safe?
The README says Liquid does not evaluate code, so templates cannot run code on your server.
How do I install it?
Add gem 'liquid' to your Gemfile. The README shows parsing a template and rendering it with a parameter hash.
What are environments?
Scoped sets of custom tags, filters and configuration, so different parts of an application do not conflict.
What happens on an error?
By default errors are collected. The render! method raises on the first exception instead.
Where is the documentation?
The README links the Shopify Liquid documentation, the GitHub wiki and the version history.
What are the best Liquid alternatives?
Popular alternatives to Liquid include Liquidjs, Liquiflow and Linqqe. See all Liquid alternatives






