hexo-basedir-deployer-git

0.0.4 • Public • Published

hexo-basedir-deployer-git

Build Status NPM version Coverage Status Build status

Git deployer plugin for [Hexo base folder].

Installation

$ npm install hexo-basedir-deployer-git --save

Options

You can configure this plugin in _config.yml.

# You can use this: 
deploy:
  type: basedir-git
  repo: <repository url>
  branch: [branch]
  message: [message]
  name: [git user]
  email: [git email]
  ignore_hidden: false # default is true 
  ignore_pattern: [ignore regex]
 
# or this: 
deploy:
  type: basedir-git
  message: [message]
  repo:
    github: <repository url>,[branch]
    gitcafe: <repository url>,[branch]
  ignore_hidden: false # default is true 
  ignore_pattern: [ignore regex]
  • repo: Repository URL
  • branch: Git branch to deploy the static site to
  • message: Commit message. The default commit message is Site updated: {{ now('YYYY-MM-DD HH:mm:ss') }}.
  • name and email: User info for committing the change, overrides global config. This info is independent of git login.
  • ignore_hidden (Boolean): whether ignore hidden files to publish. the github requires the .nojekyll in root.
  • ignore_pattern: ignore pattern regex

How it works

hexo-basedir-deployer-git works by generating the site in .basedir_git and force pushing to the repo(es) in config. If .basedir_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 .basedir_git to keep the commit history.

git clone <gh-pages repo> .basedir_git

Reset

Remove .basedir_git folder.

$ rm -rf .basedir_git

License

MIT

Package Sidebar

Install

npm i hexo-basedir-deployer-git

Homepage

hexo.io/

Weekly Downloads

1

Version

0.0.4

License

MIT

Last publish

Collaborators

  • wubai