I'm trying to pass a layout path into a pug file like this. In express:
res.send(pug.renderFile(loginPagePath, { layout: layoutPath }));
In pug file
extends #{layout}
h1 This is a login page
It doesn't work. Is it possible, what I want?
question from:https://stackoverflow.com/questions/65642719/is-it-possible-to-parameterize-layout-path-in-pug-and-expressjs