hexo 网站配置

hexo 项目部署原理, 就是部署 public

通过 hexo deploy

  1. 下载插件
1
$ npm install hexo-deployer-git --save
  1. 配置
1
2
3
4
5
deploy:
type: 'git'
repo: http://www.yuelin.link:3000/liuliang/hexo-blog.git
branch: master
message: '同步发版'
  1. hexo deploy
    原理: 1. 通过给与 public 文件添加 git 2. 提交到远程的客户端 3. 在服务端配置 nginx 实现项目部署

  2. nginx 部署先不将了

  3. 配置钩子函数 在 post-receive 配置需要执行的 shell