hexo-renderer-liquid
Advanced tools
Comparing version 0.1.0 to 0.2.0
10
index.js
@@ -5,4 +5,12 @@ /* global hexo */ | ||
var engine = require('./lib/engine'); | ||
var renderer = require('./lib/renderer'); | ||
hexo.extend.renderer.register('liquid', 'html', renderer); | ||
module.exports = { | ||
Engine: engine, | ||
Renderer: renderer | ||
}; | ||
if (typeof hexo !== 'undefined') { | ||
hexo.extend.renderer.register('liquid', 'html', renderer); | ||
} |
'use strict'; | ||
var Liquid = require('liquid-node'); | ||
var assign = require('object-assign'); | ||
var engine = new Liquid.Engine(); | ||
var engine = require('./engine'); | ||
@@ -7,0 +6,0 @@ function liquidRenderer(data, locals, callback) { |
{ | ||
"name": "hexo-renderer-liquid", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Liquid renderer plugin for Hexo", | ||
@@ -5,0 +5,0 @@ "main": "index", |
@@ -11,3 +11,18 @@ # [Liquid] renderer for [Hexo] | ||
## Usage | ||
To override the [liquid-node] engine options, you need to reference the exported `Engine` property. | ||
``` javascript | ||
var renderer = require('hexo-renderer-liquid'); | ||
var engine = renderer.Engine; | ||
engine.registerFilters({ | ||
prepend: function(input, text) { | ||
return text + input; | ||
}); | ||
}); | ||
``` | ||
[Liquid]: https://github.com/Shopify/liquid | ||
[liquid-node]: https://github.com/sirlantis/liquid-node | ||
[Hexo]: http://hexo.io/ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3905
9
28
27