hexo-admin deploy

1. _config.yml

1
2
admin:
deployCommand: 'sh hexo-deploy.sh'

2. hexo-deploy.sh

1
hexo g -d

3. blog\node_modules\hexo-admin\deploy.js

  • old

    1
    var proc = spawn(command, [message], {detached: true});
  • new

    1
    var proc = spawn((process.platform === "win32" ? "hexo.cmd" : "hexo"), ['d', '-g']);