How do you force handlebars.js to ignore (and not render) templates?
Asked
Active
Viewed 6,544 times
2 Answers
32
It's possible to escape the line with backslash
\{{>partialName}}
It's not mentioned in the documentation, but a look at the source-code documentation revealed this technique.

curly_brackets
- 5,491
- 15
- 58
- 102
-
4This is a convention in Handlebars and is the way we usually do it. – doowb Mar 08 '14 at 14:44
-
Yeah, this syntax is from Handlebars.js, the default template engine that Assemble uses. – jonschlinkert Mar 09 '14 at 13:00
-
You can use whitespace control: ${ {{~foo~}} test} (http://handlebarsjs.com/expressions.html#whitespace-control) – may215 May 28 '18 at 12:34
2
HTML entity might be a solution if you just wang to display your brackets. Try {
and }
.

Weijing Jay Lin
- 2,991
- 6
- 33
- 53