Hello,
Sorry in advanced for my noobishness in this...
I have made a custom Nunjucks Filter but I can't find a way to add it to the Unibit dependency Nunjucks in order to extend it as it was described in Nunjucks documentation..
Could somebody help me to navigate through this?
The custom filter I made is in the file located at /index.js has the following:
var nunjucks = require('nunjucks');
var env = new nunjucks.Environment();
var crypto = require('crypto');
env.addFilter('md5', function(str) {
return crypto.createHash('md5').update(str).digest("hex");
});
But it is not being picked up by anything..
What i need is the following to work:
{% hash = some_variable | md5 %}
Regards
Hello,
Sorry in advanced for my noobishness in this...
I have made a custom Nunjucks Filter but I can't find a way to add it to the Unibit dependency Nunjucks in order to extend it as it was described in Nunjucks documentation..
Could somebody help me to navigate through this?
The custom filter I made is in the file located at /index.js has the following:
But it is not being picked up by anything..
What i need is the following to work:
Regards