sighmon / mjml-rails

MJML + ERb/Haml/Slim view template
https://mjml.io
Other
295 stars 64 forks source link

Add config option for fonts #111

Closed clairezed closed 4 months ago

clairezed commented 10 months ago

Hello,

Apparently, there is a config option in mjml that prevents google fonts import when we do not want it : https://github.com/mjmlio/mjml/issues/216#issuecomment-1063194602

It seems to me the easiest workaround for user among those refered to here :https://github.com/sighmon/mjml-rails/issues/13#issuecomment-274238431.

Is there a way to add it in mjml-rails config ?

Thanks for your work !

sighmon commented 10 months ago

@clairezed Hi there, we should be able to add it to the initialiser as we've done for minify. Would you like to put a pull request together for it?

# config/initializers/mjml.rb
Mjml.setup do |config|
  # disable fonts
  config.fonts = {}
end