Mustache Template Syntax
Nimbus Markdown templates use the Mustache template language to insert values from the driver model into the pages. Mustache is a widely used, well-documented standard — this page covers the subset Nimbus supports and how Nimbus uses it. For the language itself, the canonical reference is the Mustache manual and spec.
Supported syntax
Section titled “Supported syntax”| Syntax | Name | Behavior in Nimbus |
|---|---|---|
{{value}} | Variable | Inserts the value, HTML-escaped. |
{{{value}}} | Raw variable | Inserts the value without HTML-escaping. Use for content that is already HTML/Markdown (custom fields, formatted type names, code). |
{{#section}} … {{/section}} | Section | Renders the block when the value is truthy; iterates when it is a list (see below). |
{{^section}} … {{/section}} | Inverted section | Renders the block only when the value is falsy. |
{{! comment }} | Comment | Removed from the output. |
{{> name}} | Partial | Inserts another named template, rendered with the current context. |
{{parent.child.value}} | Dotted path | Walks nested properties. |
{{.}} | Implicit iterator | The current item itself (useful inside a list of simple values). |
Sections and lists
Section titled “Sections and lists”A {{#section}} block behaves three ways depending on the value:
-
List → the block is repeated once per item, with each item as the context:
{{#parameters}}## Parameters| Name | Type | Description ||------|------|-------------|{{#items}}| `{{name}}` | {{{typeHtml}}} | {{description}} |{{/items}}{{/parameters}} -
Object → the block renders once with that object as the context:
{{#returnValue}}## Return Value{{description}}{{/returnValue}} -
Boolean / simple flag → the block renders once (keeping the current context) when the value is truthy. Pair with an inverted section for an either/or:
{{#commands}}{{#isSingle}}## Instrument Command{{/isSingle}}{{^isSingle}}## Instrument Commands{{/isSingle}}{{/commands}}
What counts as “truthy”
Section titled “What counts as “truthy””A section renders (and an inverted section does not) when the value is not any of:
null/ missingfalse- an empty string
- an empty list
Everything else is truthy.
Escaped vs. raw — which to use
Section titled “Escaped vs. raw — which to use”Use {{value}} for plain text that should be HTML-escaped (names, descriptions). Use the
triple-brace {{{value}}} only when the value is already markup that must pass through
unchanged — most commonly custom field content and pre-formatted type links:
{{#customFields.remarks}}## Remarks
{{{value}}}{{/customFields.remarks}}Unresolved tags are an error
Section titled “Unresolved tags are an error”If a template references a value that does not exist on the model, the help build fails with an “Unresolved Mustache tag” error rather than silently rendering nothing. This keeps templates honest — but it means a tag must match a real field in the data model. See Layout Templates for the data available to each layout.
Not supported
Section titled “Not supported”Nimbus implements a focused subset of Mustache. The following standard Mustache features are not available:
- Lambdas (functions as values)
- Set delimiters (
{{=<% %>=}}) - Block / helper extensions (Handlebars-style helpers)
- Partial parameters / inheritance
Anything the supported features cannot express can usually be handled by embedding raw HTML directly in the template.