Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hexo-renderer-liquid

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexo-renderer-liquid - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

lib/engine.js

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);
}

3

lib/renderer.js
'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/
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc