hexo-deployer-git
Git deployer plugin for Hexo.
Installation
$ npm install hexo-deployer-git --save
If you want to use the latest features of hexo-deployer-git, you may install it from github,
$ npm install git+git@github.com:hexojs/hexo-deployer-git.git --save
Options
You can configure this plugin in _config.yml
.
deploy:
type: git
repo: <repository url>
branch: [branch]
message: [message]
name: [git user]
email: [git email]
extend_dirs: [extend directory]
ignore_hidden: false
ignore_pattern: regexp
deploy:
type: git
message: [message]
repo:
github: <repository url>,[branch]
coding: <repository url>,[branch]
extend_dirs:
- [extend directory]
- [another extend directory]
ignore_hidden:
public: false
[extend directory]: true
[another extend directory]: false
ignore_pattern:
[folder]: regexp
How it works
hexo-deployer-git
works by generating the site in .deploy_git
and force pushing to the repo(es) in config.
If .deploy_git
does not exist, a repo will initialized (git init
).
Otherwise the curent repo (with its commit history) will be used.
Users can clone the deployed repo to .deploy_git
to keep the commit history.
git clone <gh-pages repo> .deploy_git
Reset
Remove .deploy_git
folder.
$ rm -rf .deploy_git
License
MIT