metalsmith-fingerprint
A fingerprint plugin for Metalsmith.
Installation
npm install metalsmith-fingerprint
Usage
var fingerprint =
Options
-
match
String|Array<String>
A pattern to filter source files. Required.
Example
Say you want to fingerprint the file css/index.css
:
The plugin does two things:
- create a duplicate of
index.css
with a fingerprinted filename - create a
fingerprint
object on the Metalsmith metadata
The fingerprint
object is accessible from the Handlebars template:
And the template renders the fingerprinted filename:
Tests
$ npm test
License
See LICENSE.