SparkPost / heml

HEML is an open source markup language for building responsive email.
https://heml.io
MIT License
4.33k stars 157 forks source link

Any plans on a mj-include alternative? #6

Open DimitarNestorov opened 6 years ago

DimitarNestorov commented 6 years ago

mj-include tag is my deal breaker, a way to include headers and footers is a must. Is something similar or even better planned for the future?

avigoldman commented 6 years ago

Yeah, definitely. Are there any improvements you'd want to make on top of the mj-include tag that I can try for in HEML? Do you expect it to work with both remote and local files?

DimitarNestorov commented 6 years ago

My situation is a separate repository for the emails I send and what I notice is that the mj-include path is relative to the folder in which MJML is ran. I don't know about other people but since I use webpack and node all the time every file path has to be relative to the file itself, and I will assume that most devs think that way.

Example: image

You can see that the paths of the includes are relative to the root of the project. Doesn't feel right.

How I think it should be: image

Also it looks like it supports inclusion of styles now that I look at it.

And as per your question for remote files, everything is local for me.

At the end of the day if HEML has basic markup and style include support I guess I will be switching. Love the fact that you focus on responsive, it's 2017 after all. Mailjet seem to be focused on email client support.

avigoldman commented 6 years ago

Cool, this is great feedback! I'll make sure to use when I start building the include element out. I'll share it here to get your feedback too!

thommeredith commented 6 years ago

Any update on this?

pateketrueke commented 5 years ago

I also want this landed soon, effectively using pipelines or pre-processors just work out-of-the-box, e.g. pug + heml + mustache to pre-compile all my templates programmatically.

While this is working pretty fine, I lost the preview feature from the CLI, not critical yet...

Another suggestion would be support a kind-of pre-processing support, so we can pipe anything before HEML does its job.

Thank you!

lkraav commented 5 years ago

I think there must be something better out, where all the crowds are gathering and putting in work. This project unfortunately seems to have lost momentum.

pateketrueke commented 5 years ago

Well, on my side I'll see if I can implement this feature by hand (or pre-processing), and then open a PR.

If not, I'll be doing research for something I'm heavily using at my current job.