foundation / panini

A super simple flat file generator.
Other
592 stars 104 forks source link

it would be nice to have an option to leave the handlebars alone so that the output html can be used by handlebars compilers. #119

Closed essuraj closed 7 years ago

essuraj commented 7 years ago

I like panini's inline template data reading,

...........
text: Helloooo
...........
<container class="header">
  <row class="collapse">
    <columns>
     <p>{{text}}</p>
    </columns>
  </row>
</container>

Now that above is confy to test out. After testing i would like this in html. zurb emails gulp --production does this. but this also removed the handlebars.

The solution appears to be that handlebars can be escaped by {{{{raw}}}}{{{{/raw}}}} but by adding this, i loose the ability to test out the templating data syntax...

How can i achieve both from the same setup... ideally a simple toggle to produce html with handlebars should do it.

gakimball commented 7 years ago

To start, if you want to escape one expression, you can put a backslash before it, like this:

\{{text}}

You only need {{{{raw}}}} if you want to escape a whole chunk of Handlebars.

The feature you're describing is pretty specific, and I'm also not sure how it would work. So you're using Foundation for Emails, what email template service are you running your emails through?

gakimball commented 7 years ago

Closing due to inactivity.

thaoms commented 6 years ago

I know this is closed, but I have this issue while using Craft cms. I got an addon that lets the user create a newsletter and as Craft uses the Twig template engine..

gakimball commented 6 years ago

@thaoms Is the above solution not working for you?