
增加admin管理后台,配置方法很简单:
1. Setup hexo & create a blog
这一步在之前的步骤中其实已经执行了
1 |
npm install -g hexo |
2. Install the admin & start things up
注意一定要进入blog目录再执行
1 |
npm install --save hexo-admin |
open http://localhost:4000/admin/
3. Profit!
The UI should be pretty discoverable – let me know if you can’t find something.
已经已经可以打开了:http://localhost:4000/admin
4. Password protection
If you’re using Hexo admin on your live server, you want some password protection. To enable this, you just add a few config variables to your hexo _config.yml:
1 |
admin: |
将上述配置增加到 _config.yml:中,之后登陆admin的时候就开始需要输入用户名和密码
5. Custom post metadata
To add and edit your own post metadata with the admin interface, add the metadata variable and your custom variables to your hexo _config.yml:
1 |
metadata: |
You can provide default values that will be used to initialize the metadata of a new post.
6. Contribute!
let me know how it can be improved in the github issues
fork and pull-request




近期评论