Skip to content

Instantly share code, notes, and snippets.

@sundarj
Last active September 6, 2015 02:07
Show Gist options
  • Save sundarj/6cff8582e1b8bd9b0d20 to your computer and use it in GitHub Desktop.
Save sundarj/6cff8582e1b8bd9b0d20 to your computer and use it in GitHub Desktop.
<:import src="some/path">, <:include src="some/path">
imports the file under some/path into the current file
<:self>, <:this>, <:i>
these are placeholder elements, that indicate where the template's content should be put (in case you want anything before or after)
<:if condition>
start if statement
<:else>
start else statement
<:endif>, <:fi>
end if/else statement
[:is="foo"]
the content in the template under the "foo" key will be placed into the element with this attribute
[:of="things"]
this is a for-loop: all of the items in the "things" array will be used to create elements, with inner content being the i-th item
[:as="currency"]
use the `currency` helper on the content from the template before insertion
[:void]
do not fill in the element's inner content
":self", ":this", ":i"
when written in an attribute, will be replaced with the template content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment