queckezz / koa-views

Template rendering middleware for koa (hbs, swig, pug, anything! :sparkles:)
MIT License
710 stars 87 forks source link

add locals in options for render options #70

Closed lext-7 closed 8 years ago

queckezz commented 8 years ago

Thanks for the PR. If you still want this, can you provide me with an example of where this might be useful? Thank again :sparkles:

lext-7 commented 8 years ago

set root option for ejs by locals

views(rootPath, {
    map: {
        html: 'ejs'
    },
    locals: {
        root: rootPath
    }
});