-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Views doesn't work if the main app's default view engine is not jade #1
Comments
The issue is fixed now: There's a Thank you for taking the time and helping the development of this module! :) |
I'm using nunjucks as my default view engine and when I go to /admin I get a template not found error: "template not found: /home/joe/Documents/chipin/node_modules/penguin/views/index.jade" |
Hi @joejean You can specify the path = require('path')
penguin = require("penguin")
admin = new penguin.Admin {
templatesPath: path.resolve(__dirname, '../views/', '%s.html')
}
... Assuming that your nunchucks templates have Hope this helps! |
Please change
_render: (req, res, template, locals) =>
res.render path.resolve(__dirname, '../views/', template), locals
to
_render: (req, res, template, locals) =>
res.render path.resolve(__dirname, '../views/', template + '.jade'), locals
(added '.jade' suffix)
in file src/index.coffee
in line 314
PS: I don't know how to make pull requests...
The text was updated successfully, but these errors were encountered: