title: How can I reuse code (html + handlebars) in assemble to show categorized lists?
body: <p>I'm using <a href="https://github.com/assemble/assemble" rel="nofollow">assemble</a></p>
  
  <p>For example, if I have this data:</p>
  
  <pre><code>   {"people": [
          {
              "name": "Sally",
              "group": "A"
          },
          {
              "name": "John",
              "group": "B"
          },
          {
              "name": "Jane",
              "group": "B"
          },
          {
              "name": "Skippy",
              "group": "A"
          }
      ]}
  </code></pre>
  
  <p>How can I render two separate lists of names based on property values (A or B)?</p>
  
  <p>Here is the desired html output:</p>
  
  <pre><code>&lt;p&gt;Group A&lt;/p&gt;
  &lt;ul&gt;
      &lt;li&gt;Sally&lt;/li&gt;
      &lt;li&gt;Skippy&lt;/li&gt;
  &lt;/ul&gt;
  
  &lt;p&gt;Group B&lt;/p&gt;
  &lt;ul&gt;
      &lt;li&gt;John&lt;/li&gt;
      &lt;li&gt;Jane&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Currently, my handlebars template code looks like this. But, I want to avoid copying the same code again and again.</p>
  
  <pre><code>&lt;p&gt;Group A&lt;/p&gt;
  {{#each index.people }}
      {{#is group "A"}}
          {{ name }}: {{ group }}
      {{ /is }}
  {{ /each }}
  </code></pre>