barc/express-hbs — pull request #11 by autoric (2013-01-16 18:06:28+00:00)
Title: Change how layout paths are resolved

Currently, layout paths are resolved relative the template. This can become a pain for nested views and maintainability. Given an example like:

```
views/
index.hbs
home/
userpage.hbs
admin/
users/
list.hbs
layouts/
default.hbs
```

These views would respectively use the layout directives. For a lot of views this can be frustrating if I decide I want to refactor the directory structure or whatever.

```
{{!< layouts/default }}
{{!< ../layouts/default }}
{{!< ../../layouts/default }}
```

This pull request will add a configuration option "layoutsDir" that all layouts will be resolved against. If that option is not given, it will fallback to current behavior.