
使用hexo-admin页面管理博客
安装hexo-admin
插件地址:https://github.com/jaredly/hexo-admin
安装:
npm install --save hexo-admin
启动项目
hexo s
浏览器访问localhost:4000/admin。
配置admin
为了安全,不能让所有人访问这个地址都能够有admin的权限,我们需要添加用户名与密码,在localhost:4000/admin/网站中点击右上角的settings,然后点击下面的 Setup authentification here 。填写好用户名与密码,还有secret,会出现如下配置:
# hexo-admin authentification
admin:
username: username
password_hash: <bcrypt-hash>
secret: replace-with-a-long-random-secret
把这些信息全部都复制粘贴到项目的核心配置文件_config.yml中,粘贴到最后面即可。