git-backup.
if your hexo version is 2.x.x, you should install as follow:
$ npm install [email protected] --saveif version is 3.x.x, you should install as follow:
$ npm install hexo-git-backup --saveif you install with --save, you must remove firstly when you update it.
$ npm remove hexo-git-backup
$ npm install hexo-git-backup --saveYou should configure this plugin in _config.yml.
backup:
type: git
repository:
github: [email protected]:xxx/xxx.git,branchName
gitcafe: [email protected]:xxx/xxx.git,branchNamehexo backup
or
hexo b
if you want to back up with your theme,just add theme: your theme name,your theme name in _config.yml.
backup:
type: git
theme: coney,landscape,xxx
repository:
github: [email protected]:xxx/xxx.git,branchName
gitcafe: [email protected]:xxx/xxx.git,branchNameAttention: if you do as above, the dir themes/coney/.gitwill be removed
if you want DIY commit message, just add 'message: update xxx'.
backup:
type: git
message: update xxx
repository:
github: [email protected]:xxx/xxx.git,branchName
gitcafe: [email protected]:xxx/xxx.git,branchNameNow you can backup all the blog!
You may get some troubles by your computer' permission。
it is caused by permission. just do 'sudo hexo b'
sudo hexo b