MIIS 3.1.0
Added support for the following Liquid filters not available in 3.0.0 (because they weren't available in DotNetLiquid):
concat
: it works with arrays or any IEnumerable colleciton. It adds a custom optional parameter to indicate in you want to remove duplicated elements, for example:{{ relatedposts | concat: myposts, true}}
. That saves you the use of theuniq
filter for that, and is faster.reverse
: Reverses the order of the items in an array or any IEnumerable.
and added two new useful filters to work with URLs:
relative_url
: generates the url relative to the root folder of the site to the specified path . For example if you call it inside a content in the/blog
folder:{{ "images/logo.jpg" | relative_url }}
it'll return:/blog/images/logo.jpg
.absolute_url
: it's exactly the same but including the full protocol and domain:{{ "images/logo.jpg" | absolute_url }}
-->https://www.yoursite.com/blog/images/logo.jpg
.
Both of them work with relative paths, paths with ../
, root related paths with ~/
and absolute paths with the full URL (for example, external images).
Important: make sure you remove the
WhereFilter.dll
file in the/bin/MIISCustomFilters
folder. Now its name isMIISLiquidFilters.dll
and includes all the Liquid filters in the same DLL.