hexo-admin插件可为hexo提供可视化界面,用来管理博客文章,发布博客。
博客根目录打开git bash
npm install --save hexo-admin
hexo s
此时应能打开 http://localhost:4000/admin
_config.yml
配置文件中。内容示例如下# hexo-admin authentification
admin:
username: username
password_hash: $2a$10$L.XAIqIWgTc5S1zpvV3MEu7/rH34p4Is/nq824smv8EZ3lIPCp1su
secret: my super secret phrase
windows系统下按如下设置
hexo-publish.bat
,内容如下:@echo off
call hexo g && hexo d
_config.yml
中 admin部分修改如下:# hexo-admin authentification
admin:
username: username
password_hash: $2a$10$L.XAIqIWgTc5S1zpvV3MEu7/rH34p4Is/nq824smv8EZ3lIPCp1su
secret: my super secret phrase
deployCommand: ‘hexo-publish.bat'
http://localhost:4000/admin
post
页面发布博客,发完本地即可访问deploy
页面同步到远程服务器。