The default configuration on the official website is
nunjucks.configure('views', { autoescape: true });
The template directory is under /views. If I want to change it to be under group directories such as /views/admin and /views/home, can this be achieved through configuration? Or do I need to modify the render method?
If the framework provides middleware, you can intercept it in the middleware, then identify whether it is a front-end module or a back-end module, and finally configure dynamic nunjucks