I’ve just finished working on my fork of the Liquid template engine.
Liquid is a templating library which was originally developed for usage with Ruby on Rails in Shopify. It uses a combination of tags, objects, and filters to load dynamic content. They are used inside Liquid template files, which are a group of files that make up a theme.
Here is a simple example:
The implementation my fork is based on was a little outdated and I decided that I could make some improvements to it.
Namespaces were added. Now all classes are under
Liquid namespace. The library now implements PSR-4. The minimum required PHP version is
You can now install the library via composer. Here is the package’s page.
New standard filters
Implemented new standard filters:
For the full list of supported filters read the Ruby implementation’s wiki page.
raw tag was added. The implementation of
unless tag is in plans. You’re welcome to contribute.