shannonmoeller / gulp-hb

A sane Gulp plugin to compile Handlebars templates. Useful as a static site generator.
http://npm.im/gulp-hb
MIT License
147 stars 14 forks source link

importing inline css via helper #52

Closed lubomirblazekcz closed 7 years ago

lubomirblazekcz commented 7 years ago

Hello, I'm trying to import inline css via helper. eg. inline_css: fs.readFileSync('css/style.css','utf8')

But in the output the entities are converted.. example:

= to = 
& to &, 

is there any way to disable this?

shannonmoeller commented 7 years ago

Yep! Handlebars itself provides the solution. Use three curly braces instead of two:

<!-- insert escaped value (`=` to `&#x3D;`) -->
{{inline_css}}

<!-- insert raw value (`=` stays `=`) -->
{{{inline_css}}}
lubomirblazekcz commented 7 years ago

I totally forgot about that, thanks a lot!