koajs / koa-hbs

Handlebars templates for Koa.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support use of index.hbs for views

dwhieb opened this issue · comments

Assuming the following folder structure:

/views
  /home
    - index.hbs
    - home.css
  /contact
    - index.hbs
    - contact.css

It should be possible to render a view by calling context.render('home'). koa-hbs should look for an index.hbs file in the /home folder, and use that template if found.

Currently, it is only possible to render a view with the above folder structure by using context.render('home/index').