The Header partial

Now that we have the footer partial in place, let's create the header partial. That means we'll need to create a brand new file header.hbs. We'll want to add the h1 tag inside that file and then we'll render the partial in both about.hbs and home.hbs. Both pages should still look the same.

We'll get started by creating a new file in the partials folder called header.hbs.

Inside header.hbs, we'll take the h1 tag from our website, paste it right inside and save it:

<h1>{{pageTitle}}</h1>

Now we can use this header partial in both about and home files. Inside of about, we need to do this using the syntax, the double curly braces with the greater than sign, followed by the partial name header. We'll do the exact same thing ...

Get Learning Node.js Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.