Closed betsydupuis closed 9 years ago
I was able to fix it: Changed
$styleLinks = $('link');
to....
$styleLinks = $('link:not([data-ignore-link])');
Use data-ignore-link.
Is this pull request worthy?
Also as a side note, this may be useful for including libraries in email clients that support style links.
Sounds like a plan, @jeremypeter any objections?
I think we can just ignore external styles that are hosted by default instead of creating another attribute. What do you think?
@itsjustluck @yargalot - Actually, now that I think of it, you can just use the juice option removeLinkTags
and set it to false
within the options
object. That will prevent the default action which is to remove all link tags. Make sure you have the latest version of grunt-email-builder as well. I thought I had fixed the issue ENOENT issue.
Example
options: {
removeLinkTags: false
}
For me, it would still be useful to remove the link tags that need to be removed.
I think that the idea that if it's hosted, it doesn't get inlined is useful, but it might be confusing if it's not explicit.
Version 3.0.0 will fix this. Use the data-embed-ignore
attribute on the tags you want to preserve.
When trying to use web fonts with stylesheet links, email builder will attempt to read the file even with data-ignore.
Here is there error: Warning: Unable to read "http://fonts.googleapis.com/css?family=Lato:300,400,700,900" file (Error code: ENOENT). Use --force to continue.