Navbar on all pages

I suppose using handlebars on all pages would be my best option. I’ve started doing that, but I can’t figure out how to embed my navigation bar, which is stored in navbar.html. I tried using partials to no avail:

this.navbar = this.fs.readFileSync('/navbar.html', 'utf-8');
this.hb.registerPartial('nav', this.navbar);

Then, on the html (that is compiled with handlebars, obviously):

{{> nav}}

I’ll keep poking at it.


EDIT
Nvm, partials was not the solution. I needed to do {{{nav}}}.So far this looks like it will be the best solution, but I’m not sure how I’ll hook in the other buttons…

1 Like