# gitbook-plugin-comments-footer-juanmaguitar

> A repo focusing on comments integrated with code management providers like GitLab or GitHub.

Latest version **1.4.3** (published 2020-02-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install gitbook-plugin-comments-footer-juanmaguitar
pnpm add gitbook-plugin-comments-footer-juanmaguitar
yarn add gitbook-plugin-comments-footer-juanmaguitar
bun add gitbook-plugin-comments-footer-juanmaguitar
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.3 |
| Published | 2020-02-28 |
| First published | 2020-02-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 10.x |
| Dependencies | 5 |
| Unpacked size | 5.1 MB |
| Known vulnerabilities | 0 (+24 in 4 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Aleen |
| Maintainers | juanmaguitar |
| Keywords | gitbook, gitbook-plugin, comments |

## Links

- npm: https://www.npmjs.com/package/gitbook-plugin-comments-footer-juanmaguitar
- Repository: https://github.com/trainings-juanmaguitar/gitbook-comments-juanmaguitar
- Homepage: https://github.com/trainings-juanmaguitar/gitbook-comments-juanmaguitar#readme
- Issues: https://github.com/trainings-juanmaguitar/gitbook-comments-juanmaguitar/issues
- npm.io page: https://npm.io/package/gitbook-plugin-comments-footer-juanmaguitar

## Dependencies (5)

- [dotenv](https://npm.io/package/dotenv.md) ^8.2.0
- [marked](https://npm.io/package/marked.md) 0.6.1
- [moment](https://npm.io/package/moment.md) 2.24.0
- [simplemde](https://npm.io/package/simplemde.md) 1.11.2
- [handlebars](https://npm.io/package/handlebars.md) 4.1.1

## Recent versions

- 1.4.3 (latest) — 2020-02-28
- 1.4.2 — 2020-02-28

## README

## gitbook-comments

A project focusing on comments integrated with code management providers like GitLab or GitHub.

![npm](https://aleen42.github.io/badges/src/npm.svg) ![javascript](https://aleen42.github.io/badges/src/javascript.svg) ![gitbook](https://aleen42.github.io/badges/src/gitbook_1.svg) ![gitbook](https://aleen42.github.io/badges/src/gitbook_2.svg)

![](https://img.shields.io/badge/%20%20JavaScript-%20%20%20%2041,538L-f1e05a.svg) ![](https://img.shields.io/badge/%20%20CSS-%20%20%20%20961L-563d7c.svg) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/trainings-juanmaguitar/gitbook-comments-juanmaguitar/master/LICENSE) [![npm](https://img.shields.io/npm/dt/gitbook-plugin-comments-footer-juanmaguitar.svg)](https://www.npmjs.com/package/gitbook-plugin-comments-footer-juanmaguitar)

![comments-footer](./preview.png)

### Installation

Add the following plugins to your `book.json` and run the command `gitbook install`

```json
{
	"plugins": ["comments-footer"]
}
```

### Usage

#### 1. GitHub

To use this plugin in a GitBook project deployed on GitHub, the first step is to install [the GitHub app](https://github.com/apps/aleen42-gitbook-comments) in your repository for accessing.

And then, the configuration option can be set as an object like the following snippet:

```json
{
	"plugins": [
		"comments-footer"
	],
	"pluginsConfig": {
		"comments-footer": {
			"type": "github",
			"repo": "trainings-juanmaguitar/gitbook-comments-juanmaguitar",
			"copyright": "Copyright © aleen42"
		}
	}
}
```

#### 2. GitLab

What if using it in GitLab? You may need to create an application yourself with `API` scope accessing.

![gitbook-comments](./gitlab_application.png)

- **Name**: any name you want
- **Redirect URI**: the page url you published
- **Scopes**: choose `api`

And then, the configuration option can be set as an object like the following snippet:

```json
{
	"plugins": [
		"comments-footer"
	],
	"pluginsConfig": {
		"comments-footer": {
			"type": "gitlab",
			"repo": "fe-components/fe-documents",
			"copyright": "Copyright © aleen42",
			"redirect": "xxx",
			"clientId": "xxx",
			"host": "http://git.xxx.cn/"
		}
	}
}
```

- **redirect**: the page url you published
- **clientId**: the Application ID of your application created above
- **host**: the GitLab server host

### TODO

- [ ] Disable subscribing states when commenting on articles.
- [x] Replying features on GitLab.
- [x] ~~GitLab features depend on the functions around commit comments: https://gitlab.com/gitlab-org/gitlab-ce/issues/59798.~~ Use discussion instead.
- [x] ~~GitLab private access token has no detailed scope for avoiding abusing by others.~~ It means that I cannot get discussions when users do not authorize themselves.

### Release History

* ==================== **1.0.0 Initial release** ====================
	* 1.1.2 oauth2 integration
	* 1.1.3 initial structure for featuring GitHub
	* 1.1.4 fix bug
	* 1.1.5 enhancement for reducing authorizing redirecting
	* 1.1.6 enhancement of compatible styles
	* 1.1.9 styles for the authorization wrapper and unexpected redirect url
	* 1.2.0 support GitLab
	* 1.2.2 fix commented time and passed parameters when leaving comments in GitLab
	* 1.2.3 show user link anchor
	* 1.2.5 bug fix and show site link after leaving comments
	* 1.2.7 list all commits recursively
	* 1.2.9 bug fix
	* 1.3.0 more restrict regression for matching commit difference
	* 1.3.1 support replying features in GitLab
	* 1.3.2 redirect to visited site after authorized in GitLab
	* 1.3.3 fix NPE problem
	* 1.3.5 autocomplete feature within GitLab and fix a bug
	* 1.3.7 unified font sizes
	* 1.3.8 compatible autocomplete for GitHub
	* 1.3.9 feature autocomplete for GitHub
	* 1.4.2 deprecated token access way for GitHub

### :fuelpump: How to contribute

Have an idea? Found a bug? See [how to contribute](https://aleen42.github.io/PersonalWiki/contribution.html).

### :scroll: License

[MIT](https://aleen42.github.io/PersonalWiki/MIT.html) © aleen42

---
_Source: https://npm.io/package/gitbook-plugin-comments-footer-juanmaguitar · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
