nunjucks-fuzzyfile
v1.0.1
Published
Nunjucks fuzzy file search tag extension
Downloads
2
Maintainers
Readme
Nunjucks fuzzy file search tag extension
Nunjucks fuzzy file search tag extension.
Installation
npm i nunjucks-fuzzyfile
Usage
const Fuzzyfile = require('nunjucks-fuzzyfile');
// env is nujucks environment
env.addExtension('fuzzyfile', new Fuzzyfile());
fuzzyfile
Looks for file matching pattern filename*.ext
and returns matched filename. If no matches found returns the filename.
{% fuzzyfile filepath %}
Example:
{% fuzzyfile 'static/app.js' %}
License: MIT.