Skip to content

Example Handlebars Templates

Ashley Towner edited this page Sep 6, 2025 · 5 revisions

Here's a set of different templates for common use-cases

Markdown

Monster

# {{{name}}}
{{#if description}}*{{{description}}}*{{/if}}

**AC** {{ac}}{{#if armor}} ({{{armor}}}){{/if}}, **HP** {{hp}}, **ATK** {{#each attacks}}{{#each this}}{{#if quantity}}{{quantity}} {{/if}}{{{name}}}{{#if range}} ({{range}}){{/if}} {{bonus}}{{#if damage}} ({{{damage}}}){{/if}}{{#unless @last}} and {{/unless}}{{/each}}{{#unless @last}} or {{/unless}}{{/each}}, **MV** {{movementDistance}}{{#if movementType}} ({{{movementType}}}){{/if}}, **S** {{signedNumber strength}}, **D** {{signedNumber dexterity}}, **C** {{signedNumber constitution}}, **I** {{signedNumber intelligence}}, **W** {{signedNumber wisdom}}, **Ch** {{signedNumber charisma}}, **AL** {{firstChar alignment}}, **LV** {{level}}

{{#each traits}}
**{{{name}}}.** {{{description}}}

{{/each}}

Spell

# {{{name}}}

*Tier {{tier}}{{#each classes}}, {{{this}}}{{/each}}*

**Duration:** {{duration}}
**Range:** {{range}}

{{{description}}}

Magic Item

# {{{name}}}

{{#if description}}*{{{description}}}*{{/if}}

{{#each traits}}
**{{{name}}}.** {{{description}}}

{{/each}}

Bulk

{{#each this}}
	{{#if (eq type "monster") }}
# {{{name}}}
{{#if description}}*{{{description}}}*{{/if}}

**AC** {{ac}}{{#if armor}} ({{{armor}}}){{/if}}, **HP** {{hp}}, **ATK** {{#each attacks}}{{#each this}}{{#if quantity}}{{quantity}} {{/if}}{{{name}}}{{#if range}} ({{range}}){{/if}} {{bonus}}{{#if damage}} ({{{damage}}}){{/if}}{{#unless @last}} and {{/unless}}{{/each}}{{#unless @last}} or {{/unless}}{{/each}}, **MV** {{movementDistance}}{{#if movementType}} ({{{movementType}}}){{/if}}, **S** {{signedNumber strength}}, **D** {{signedNumber dexterity}}, **C** {{signedNumber constitution}}, **I** {{signedNumber intelligence}}, **W** {{signedNumber wisdom}}, **Ch** {{signedNumber charisma}}, **AL** {{firstChar alignment}}, **LV** {{level}}

{{#each traits}}
**{{{name}}}.** {{{description}}}

{{/each}}
	{{/if}}
	{{#if (eq type "spell") }}
# {{{name}}}

*Tier {{tier}}{{#each classes}}, {{{this}}}{{/each}}*

**Duration:** {{duration}}
**Range:** {{range}}

{{{description}}}
	{{/if}}
	{{#if (eq type "magicItem") }}
# {{{name}}}

{{#if description}}*{{{description}}}*{{/if}}

{{#each traits}}
**{{{name}}}.** {{{description}}}

{{/each}}
	{{/if}}
{{/each}}

HTML

Monster

<h1>{{{name}}}</h1>
{{#if description}}
  <em>{{{description}}}</em>
{{/if}}

<p>
  <strong>AC</strong>
  {{ac}}{{#if armor}} ({{{armor}}}){{/if}},
  <strong>HP</strong>
  {{hp}},
  <strong>ATK</strong>
  {{#each attacks}}{{#each this}}{{#if quantity}}{{quantity}}
      {{/if}}{{{name}}}{{#if range}} ({{range}}){{/if}}
      {{bonus}}{{#if damage}} ({{{damage}}}){{/if}}{{#unless @last}}
        and
      {{/unless}}{{/each}}{{#unless @last}} or {{/unless}}{{/each}},
  <strong>MV</strong>
  {{movementDistance}}{{#if movementType}} ({{{movementType}}}){{/if}},
  <strong>S</strong>
  {{signedNumber strength}},
  <strong>D</strong>
  {{signedNumber dexterity}},
  <strong>C</strong>
  {{signedNumber constitution}},
  <strong>I</strong>
  {{signedNumber intelligence}},
  <strong>W</strong>
  {{signedNumber wisdom}},
  <strong>Ch</strong>
  {{signedNumber charisma}},
  <strong>AL</strong>
  {{firstChar alignment}},
  <strong>LV</strong>
  {{level}}
</p>
{{#each traits}}
  <p>
    <strong>{{{name}}}.</strong>
    {{{description}}}
  </p>
{{/each}}

Spell

<h1>{{{name}}}</h1>
<p><em>Tier {{tier}}{{#each classes}}, {{{this}}}{{/each}}</em></p>
<p><strong>Duration:</strong> {{duration}} <strong>Range:</strong> {{range}}</p>
<p>{{{description}}}</p>

Magic Item

<h1>{{{name}}}</h1>
<p>{{#if description}}<em>{{{description}}}</em>{{/if}}</p>
{{#each traits}}
  <p><strong>{{{name}}}.</strong> {{{description}}}</p>
{{/each}}

Bulk

{{#each this}}
{{#if (eq type "monster") }}
<h1>{{{name}}}</h1>
{{#if description}}
  <em>{{{description}}}</em>
{{/if}}

<p>
  <strong>AC</strong>
  {{ac}}{{#if armor}} ({{{armor}}}){{/if}},
  <strong>HP</strong>
  {{hp}},
  <strong>ATK</strong>
  {{#each attacks}}{{#each this}}{{#if quantity}}{{quantity}}
      {{/if}}{{{name}}}{{#if range}} ({{range}}){{/if}}
      {{bonus}}{{#if damage}} ({{{damage}}}){{/if}}{{#unless @last}}
        and
      {{/unless}}{{/each}}{{#unless @last}} or {{/unless}}{{/each}},
  <strong>MV</strong>
  {{movementDistance}}{{#if movementType}} ({{{movementType}}}){{/if}},
  <strong>S</strong>
  {{signedNumber strength}},
  <strong>D</strong>
  {{signedNumber dexterity}},
  <strong>C</strong>
  {{signedNumber constitution}},
  <strong>I</strong>
  {{signedNumber intelligence}},
  <strong>W</strong>
  {{signedNumber wisdom}},
  <strong>Ch</strong>
  {{signedNumber charisma}},
  <strong>AL</strong>
  {{firstChar alignment}},
  <strong>LV</strong>
  {{level}}
</p>
{{#each traits}}
  <p>
    <strong>{{{name}}}.</strong>
    {{{description}}}
  </p>
{{/each}}
{{/if}}
{{#if (eq type "spell") }}
	<h1>{{{name}}}</h1>
	<p><em>Tier {{tier}}{{#each classes}}, {{{this}}}{{/each}}</em></p>
	<p><strong>Duration:</strong> {{duration}} <strong>Range:</strong> {{range}}</p>
	<p>{{{description}}}</p>
{{/if}}
{{#if (eq type "magicItem") }}
<h1>{{{name}}}</h1>
<p>{{#if description}}<em>{{{description}}}</em>{{/if}}</p>
{{#each traits}}
  <p><strong>{{{name}}}.</strong> {{{description}}}</p>
{{/each}}
{{/if}}
{{/each}}

Clone this wiki locally