-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Suggestion: Email compilation file type + preview with dummy data. #87
Comments
Definitely sums up what we talked about here. This allows us to treat g-w-e as a "dev" environment for emails, while our (non-mailgun) third party system of choice acts as "staging" where we eventually fire off "production" emails. Thoughts:
I'm still not sure where in the grunt process handlebars content gets substituted for real data if it exists. I could crudely intercept and escape a lot of my tags to achieve pass-through mode. |
Love this suggestion. Admittedly I usually hack the flow a bit to provide outputs for whatever 3rd party tool/code I'm using e.g. a service that needs @taeo All your ideas make sense. |
@ericdfields - data formats / naming conventions are key for sure. I do like the consideration of not inlining styles, presuming that the final engine will do that. @leemunroe - Express Server comes with a number of template engines supported out of the box, and many, many others from 3rd parties. I don't see that being too complicated to add supported engines and then conditionally process the preview based on the template extension / engine. Hypothetically of course. Pushing this to the next level - should we make a bit of a spec, go YOLO style and just start a fork to play with, other? |
@taeo Your call. Some times I find it easier to just create a fork and start hacking. But if you want to get something a bit more formal in here to nail down ideas and scope, also sounds good. |
Some quick research and feasibility tests are looking 👍.
|
Hey @ericdfields, @leemunroe and anyone else interested in testing this out. I just got a branch pushed up on my fork for multiple template engines. It supports It adds a raw helper:
Sample data can be created in There's room for improvement, but it's a fully functional proof of concept! Look forward to your feedback. caveat php is in there, but it's broken. There's some awkwardness passing variables into the previewer. |
Wow impressive work! Some things that come to mind after playing with this:
|
Thanks! To your points.
|
|
@taeo Been a while since we had some activity here. You got pretty far. Checking in to see if we have something to merge? |
@leemunroe - Thanks for the follow up here. Catching up from vacation, but I can get a PR going in the not-too-distant future for this. Cheers. |
Whew, time flew by. Will get back on this PR / feature shortly. |
Not all use cases for this workflow benefit from pure .html compiled templates. Many times we are loading our templates into various third party systems with a variety of compilers and subsequent dynamic data. The objective is to have pristine templates compiled, but allow live-ish previewing and testing.
Approach:
dist/
files to be written as whatever type (.liquid, .hbs, .php, etc...)Thoughts, questions, issues, likes...?
FYI @ericdfields
The text was updated successfully, but these errors were encountered: