Trott / grunt-html-smoosher

A grunt task which takes an HTML file, finds all the CSS and JS links, and outputs a version with all the CSS and JS written inline for ease of pasting into a cms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Font url's broken

seriema opened this issue · comments

After running smoosher my url() values in the inlined CSS stay the same as when they were in a separate file, in a different folder.

In other words, my CSS file was in styles/style.css so all @font-face attributes naturally did ../fonts/. The inlined version keeps that path, so now my fonts don't load.

I tried the options: property by setting cssDir: '../' but that didn't change anything.

Use the path config to update your CSS urls to the correct path https://github.com/motherjones/grunt-html-smoosher#path-config

I already tried setting cssDir but that didn't help.

+1 font paths in CSS files are being broken

I've forked this project and revamped some features with assetsUrlPrefix option which should fixes assets URL issue:

https://github.com/sparanoid/grunt-assets-inline#additional-assets-url-prefix