# hexo-basedir-deployer-git

> Git deployer plugin of Hexo base dir.

Latest version **0.0.4** (published 2017-02-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install hexo-basedir-deployer-git
pnpm add hexo-basedir-deployer-git
yarn add hexo-basedir-deployer-git
bun add hexo-basedir-deployer-git
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2017-02-04 |
| First published | 2017-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | wubai |
| Maintainers | wubai |
| Keywords | hexo, git, deploy, deployer, source, base dir |

## Links

- npm: https://www.npmjs.com/package/hexo-basedir-deployer-git
- Repository: https://github.com/zhenghonglei/hexo-basedir-deployer-git
- Homepage: https://hexo.io/
- Issues: https://github.com/zhenghonglei/hexo-basedir-deployer-git/issues
- npm.io page: https://npm.io/package/hexo-basedir-deployer-git

## Dependencies (6)

- [swig](https://npm.io/package/swig.md) ^1.4.2
- [chalk](https://npm.io/package/chalk.md) ^1.1.3
- [moment](https://npm.io/package/moment.md) ^2.13.0
- [hexo-fs](https://npm.io/package/hexo-fs.md) ^0.1.6
- [bluebird](https://npm.io/package/bluebird.md) ^3.4.1
- [hexo-util](https://npm.io/package/hexo-util.md) ^0.6.0

## Alternatives

- [postcss-color-hex-alpha](https://npm.io/package/postcss-color-hex-alpha.md) — 6.4M weekly downloads
- [randomcolor](https://npm.io/package/randomcolor.md) — 348.0K weekly downloads
- [bows](https://npm.io/package/bows.md) — 1.3K weekly downloads
- [ep_prefer_color_scheme](https://npm.io/package/ep_prefer_color_scheme.md) — 260 weekly downloads
- [coc-yank](https://npm.io/package/coc-yank.md) — 61 weekly downloads

## Recent versions

- 0.0.4 (latest) — 2017-02-04
- 0.0.3 — 2017-02-04
- 0.0.2 — 2017-02-04
- 0.0.1 — 2017-02-04

## README

# hexo-basedir-deployer-git

[![Build Status](https://travis-ci.org/zhenghonglei/hexo-basedir-deployer-git.svg?branch=master)](https://travis-ci.org/zhenghonglei/hexo-basedir-deployer-git) [![NPM version](https://badge.fury.io/js/hexo-basedir-deployer-git.svg)](https://www.npmjs.com/package/hexo-basedir-deployer-git) [![Coverage Status](https://img.shields.io/coveralls/hexojs/hexo-basedir-deployer-git.svg)](https://coveralls.io/r/hexojs/hexo-basedir-deployer-git?branch=master) [![Build status](https://ci.appveyor.com/api/projects/status/liqy4nib33ht70so/branch/master?svg=true)](https://ci.appveyor.com/project/tommy351/hexo-basedir-deployer-git/branch/master)

Git deployer plugin for [Hexo base folder].

## Installation

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

## Options

You can configure this plugin in `_config.yml`.

``` yaml
# 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.

``` bash
$ rm -rf .basedir_git
```

## License

MIT

[Hexo]: http://hexo.io/

---
_Source: https://npm.io/package/hexo-basedir-deployer-git · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
