2

I'm trying to add content into the head tags of my handlebars layout but haven't figured out a way to make it work. Basically I just want to be able to add links to stylesheets or javascript files on particular pages, not site-wide. I've tried working with helpers and partials but nothing has worked so far, I think part of the problem is because most suggestions are for regular handlebars and they don't work quite right with express handlebars.

Should I use multiple layouts?

What I'm trying to do - layout.handlebars:

<!DOCTYPE html>
<head>
    <title>{{title}}</title>
    <link rel="stylesheet" href="/css/site-wide-styles.css">
    {{css/js/meta unique to the page being viewed}}
</head>
<body>
    {{{body}}}
</body>
</html>
jbaumann
  • 181
  • 6
  • I have this same issue, and I am yet to receive an answer. On a careful inspection of the express -handlebars package in the node modules, I don't think, this can be achieved in express-handlebars now – Ogbonna Vitalis Jan 20 '19 at 13:51

0 Answers0