Using Layout, Partials with Handlebars Template
<p>How do I use layouts, partials with handlebars template like the following?</p>

<p>I have looked at the <a href="http://handlebarsjs.com/partials.html" rel="noreferrer">partial</a> docs but still could not figure out what I wanted to achieve.</p>

<p><strong>default.html</strong></p>

<p>The default layout is reused for the different views of the site. <code>{{{content}}}</code> is used as a placeholder for where the main content will be rendered.</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;  
  &lt;title&gt;{{title}}&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
 &lt;p&gt;This is the top of the body content in the default.html file&lt;/p&gt;
 {{{content}}}
 &lt;p&gt;This is the bottom of the body content in the default.html file&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p><strong>index.html</strong></p>

<pre><code>{{#&gt; default}}

{{ include header }}
&lt;p&gt;This is some other content&lt;/p&gt;
{{ include footer }}
</code></pre>

<p><strong>header.html</strong></p>

<pre><code>&lt;h1&gt;This is a header&lt;/h1&gt;
</code></pre>

<p><strong>footer.html</strong></p>

<pre><code>&lt;p&gt;This is a footer&lt;/p&gt;
</code></pre>

<p><strong>Output</strong></p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;  
  &lt;title&gt;Using Layout, Partials with Handlebars Template&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
 &lt;p&gt;This is the top of the body content in the default.html file&lt;/p&gt;
 &lt;h1&gt;This is a header&lt;/h1&gt;
 &lt;p&gt;This is some other content&lt;/p&gt;
 &lt;p&gt;This is a footer&lt;/p&gt;
 &lt;p&gt;This is the bottom of the body content in the default.html file&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>