A number of tags and filters can be encapsulated into a plugin, which will be typically installed via npm. This article provides information about how to create and use a plugin.
A liquidjs plugin is simple function which takes the Liquid class as the first parameter and the Liquid instance for
this. We can call liquidjs APIs on
this to make certain changes, especially register filters and tags.
Now we’ll make a plugin to upper case every letter of the input, save the following snippet to
Simply pass the plugin function into the
const engine = new Liquid()
Since this library excludes certain features that are available on the Shopify platform but not on the Shopify/liquid repo, see https://github.com/harttle/liquidjs#differences-and-limitations.
Here’s a list of plugins that backfill those features. Feel free to add yours, this file is publicly editable.