Hexo-admin本地部署
hexo-admin本地部署
使用以下命令即可:
1 | npm install hexo-admin --save |
hexo s
后浏览localhost:4000/admin/
,settings设置登录账户和密码,根据提示在_config.yml中配置,如下:
1 | # hexo-admin authentification |
Deploy需要在_config.yml文件中配置deployCommand,如上最后一行,新建script/hexo-d.sh
,内容:
1 | #!/bin/bash |
Windows10如上配置后,发布仍旧报错,需要更改node_modules/hexo-admin/depoly.js
文件的相关函数:
1 | module.exports = function (command, message, done) { |
如上后即可发布文章也。
新建文章编辑时,右方Publish按钮边的设置按钮,选中有文章的头部信息,开始只有Data,Author,Tags,Catagories
,如需添加其它,在_config.yml中配置,例如:
1 | metadata: |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 飞椅档案!
评论