vanng822/go-premailer

Import css files

Closed this issue · 4 comments

It would be useful if the package would automatically import local css files. This would really help to keep your source html template clean and to reuse the same style in multiple mail templates.

Hi @vanbroup

Thanks for the suggestion and sorry for the delay, I got stressed for sometimes and try not to do any unnecessary coding beside work.

I didn't think about local when I coded the package. The use case we had was that application rendered template which also imported css and everything. I just assumed that most people do that way.

However remote and local would be nice to support. If you're interested please help out?

/VN

One simple example that I did in am-lich.com project

  <head>
    <style>
    {{ template "css/common.css" }}
    {{ template "css/event.css" }}
    </style>
  </head>

@vanbroup Yes I @vanng822 's suggestion works great with html/template I found. 👍 I would suggest closing this issue.

Seems that @vanbroup is not active.
I think that we should use the option available and keep the package simple. I close this for now