Closed ghost closed 10 years ago
I solved it myself with the following code:
// Configure Handlebars
var hbs = Handlebars.create({
defaultLayout: 'main',
extname: '.html',
layoutsDir: __dirname + '/server/views/layouts/',
partialsDir: __dirname + '/server/views/partials/'
});
// Views folder and engine
app.set('views', __dirname + '/server/views/');
app.set('view engine', 'hbs');
app.engine('html', hbs.engine);
I have changed the
partialsDir
to be./server/views/partials
, however it doesn't seem to work at all, as none of the partials are found. I have the following code in myserver.js
file:The layouts, however, can be found. Has anyone else experienced this issue as well?