Skip to content

Instantly share code, notes, and snippets.

@mehfuzh mehfuzh/mustache.md forked from Dammmien/mustache.md
Created Aug 16, 2019

Embed
What would you like to do?
Mustache cheatsheet

Basic tag

  Hello {{name}} !!

Loop over a list property

{{#list}}
  {{property}} // item.property
  or
  {{.}} // item
{{/list}}

Show a block if a property is an empty list or falsy

{{^variable}}
  variable is a falsy
{{/variable}}

Show a block if a property truthy

{{#variable}}
  variable is truthy
{{/variable}}

Imports an other template

{{> header}}

Render unescaped HTML

{{{<span>unescaped</span>}}} or {{&<span>unescaped</span>}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.