简介
在线编辑和发布hexo博客。
github地址:https://github.com/jaredly/hexo-admin
安装
进入hexo源文件目录,执行命令:
1 | npm install --save hexo-admin |
配置
编辑根目录下:_config.yml
文件,添加:
1 | admin: |
其中:username
为登录的用户名,password_hash
为密码的bcrypt哈希值,secret
用于使cookie安全,可以尽可能复杂。
password_hash的生成
首先需安装模块:sudo npm install bcrypt-nodejs
执行:
1 | $ node |
其中的your_password
为登录密码。
若部署到远程服务器,就可以使用:http://ip:4000/admin/
进行访问,在线发布hexo博客。
本片博客即是通过hexo-admin在线编辑并发布的。