Skip to content

Instantly share code, notes, and snippets.

@louis-wu
Forked from defunkt/example.haml.mustache
Created May 10, 2011 03:43
Show Gist options
  • Save louis-wu/963868 to your computer and use it in GitHub Desktop.
Save louis-wu/963868 to your computer and use it in GitHub Desktop.
Haml + Mustache
#content
.left.column
%h2 Welcome to our site!
.right.column
#users
{{#users}}
%p {{user}}
{{/users}}
---
users:
- { user: chris }
- { user: bob }
- { user: jones }
---
$ cat example.yml example.haml.mustache | mustache | haml -s
<div id='content'>
<div class='left column'>
<h2>Welcome to our site!</h2>
</div>
<div class='right column'>
<div id='users'>
<p>chris</p>
<p>bob</p>
<p>jones</p>
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment