-
Notifications
You must be signed in to change notification settings - Fork 110
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
handlebars配置layout刷新路径直接读取文件内容问题 #44
Comments
@luchanan 开一个repo写个demo,然后给我 |
这个问题demo: https://github.com/luchanan/koa2_hbs.git // app.js
const hbs = require('koa-hbs')
...
// app.use(views(__dirname + '/views', {
// extension: 'hbs',
// map: { hbs: 'handlebars' },
// defaultLayout: 'layout'
// }))
app.use(hbs.middleware({
viewPath: __dirname + '/views',
layoutsPath: __dirname + '/views',
}));
请求高见 |
我安装啦 npm install -g koa-generator 之后 运行 koa koa2 && cd koa2 然后报错 koa: command not found ,我的是mac系统 node v8.2.1版本 |
@jane- 很奇怪啊,有更多信息么? |
从这里下载了koa-generator, 想在index.hbs继承layout.hbs,做了下面的修改
app.js
就改了这个,第一次没有报错,第二次貌似把layout.hbs的内容读出来作为路径了
初学不是太懂,指教一下,thanks
The text was updated successfully, but these errors were encountered: