1.0.0 • Published 6 years ago
handlebars-inline-file v1.0.0
What is it?
A dead simple handlebars helper that takes file name and inserts its contents (utf-8 encoding is used to read files).
Unlike handlebars-inline
, it does not optimize SVG files.
Usage
npm i handlebars-inline-file
In your handlebars template, write:
{{inline "filename.txt"}}
You can inline SVG or any other file containing tags, but do not forget that handlebars escapes HTML by default, so you need triple slashes:
{{{inline "filename.svg"}}}
1.0.0
6 years ago