mikser-io-render-liquid
v1.1.1
Published
[LiquidJS](https://www.npmjs.com/package/liquidjs) renderer for [Mikser](https://github.com/almero-digital-marketing/mikser-io). Renders entities whose layout uses the `.liquid` template engine.
Downloads
284
Readme
mikser-io-render-liquid
LiquidJS renderer for Mikser. Renders entities whose layout uses the .liquid template engine.
Install
npm install mikser-io-render-liquidUsage
// mikser.config.js
export default {
renderer: 'liquid',
'render-liquid': {
jsTruthy: true,
strictFilters: false
}
}The render-liquid config object is passed through to the Liquid constructor — see LiquidJS options. Defaults applied by the plugin:
root: options.layoutsFolderextname: '.liquid'cache: !options.watch(cached for one-shot builds, disabled in watch mode)
Runtime → Filters
Every function exposed on the render runtime (by Mikser itself or by other render-* helper plugins) is auto-registered as a Liquid filter. So if you load render-markdown, this works in any template:
{{ entity.meta.title }}
{{ entity.meta.body | markdown }}
{{ entity.meta.summary | removeMarkdown }}
{{ '/blog/welcome' | href: 'en' }}Includes resolve from the layouts folder:
{% include 'partials/header' %}License
MIT
