Open kylemhall opened 7 years ago
fyi, looks like my indentation was stripped out.
I have the same problem here, even though I never install hexo-admin before.
I debuged the app with following and it works as documented. var password = req.body.password; var user = hexo.config.admin; console.log(' name:%s user:%s password:%s user.password:%',name,user.name,password,user.password) console.log(' user.name:%s user.password:%s user.secret:%s user.expire:%',user.name,user.password,user.secret, user.expire)
if (name === user.name && password === user.password) {
make sure C:\Nodejs\blogHexoHey_config.yml has proper indents show here with deploy: type:
admin: name: hexo password: hey secret: hey hexo expire: 160*1
Happy New Year John
My package.json looks like this: { "name": "hexo-site", "version": "0.0.0", "private": true, "hexo": { "version": "3.2.2" }, "dependencies": { "hexo": "^3.2.0", "hexo-generator-archive": "^0.1.4", "hexo-generator-category": "^0.1.3", "hexo-generator-index": "^0.2.0", "hexo-generator-robotstxt": "^0.2.0", "hexo-generator-sitemap": "^1.1.2", "hexo-generator-tag": "^0.2.0", "hexo-hey": "^0.4.1", "hexo-renderer-ejs": "^0.2.0", "hexo-renderer-marked": "^0.2.10", "hexo-renderer-scss": "^1.0.2", "hexo-renderer-stylus": "^0.3.1", "hexo-server": "^0.2.0" }, }
At the bottom of my _config.yml I put the following: admin: name: hexo password: hey secret: hey hexo expire: 60*1
Installed all the dependencies with npm, and I started the server with "hexo serve". The site loads just fine, but going to /admin results in "Cannot GET /admin/". For what it's worth hexo-admin seems to work fine ( I deleted hexo-admin before trying hexo-hey, clean install of node_modules ).
Any idea why it's not working?