Skip to content

Instantly share code, notes, and snippets.

@jonschlinkert
Created December 5, 2012 00:49
Show Gist options
  • Save jonschlinkert/4210821 to your computer and use it in GitHub Desktop.
Save jonschlinkert/4210821 to your computer and use it in GitHub Desktop.
mustache variables idea
It would be fun to creat mustache mixins with variables like in LESS:
page-header.mustache
```sass
<div class="page-header">
<h1>@{variable}</h1>
</div>
```
and use it like this
```mustache
{{> header("Alerts") }}
```
And have it compile to:
```html
<div class="page-header">
<h1>Alerts</h1>
</div>
```
I know that's not "logic-less", but still interesting.
@doowb
Copy link

doowb commented Dec 5, 2012

I would change the mustache to this...

  {{> header({variable: "Alerts"}) }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment