这是我当前的Express设置。如何将车把布局与此设置(https://www.npmjs.com/package/handlebars-layouts)集成。我仍然想使用express-handlebars defaultLayout东西。
var exphbs = require('express-handlebars');
app.engine(".hbs", exphbs({
defaultLayout: "layout",
extname: ".hbs",
partialsDir: "views/partials/", // same as default, I just like to be explicit
layoutsDir: "views/layouts/" // same as default, I just like to be explicit
}));
app.set('view engine', '.hbs');