https://github.com/gitbookio/plugin
Sample plugin for GitBook
https://github.com/gitbookio/plugin
Last synced: 3 months ago
JSON representation
Sample plugin for GitBook
- Host: GitHub
- URL: https://github.com/gitbookio/plugin
- Owner: GitbookIO
- License: apache-2.0
- Created: 2014-04-19T11:25:09.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-11-22T20:22:18.000Z (about 8 years ago)
- Last Synced: 2025-04-20T11:37:56.011Z (9 months ago)
- Language: JavaScript
- Size: 230 KB
- Stars: 66
- Watchers: 7
- Forks: 57
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
GitBook Sample Plugin
==============
This is a model for GitBook plugins.
## How GitBook plugin works?
A plugin for GitBook is a node package that can be published on [NPM](http://www.npmjs.org). It has to follow the name convention: `gitbook-plugin-*name*`.
### package.json
#### name
The package name should begin with ```gitbook-plugin-```.
Examples: `gitbook-plugin-mixpanel`, `gitbook-plugin-googleanalytics`.
#### engine
The package.json should contain a `engine` field using [the standard norm](https://www.npmjs.org/doc/json.html#engines).
```
"engines": {
"gitbook": "*"
}
```
For example if you want your plugin to supports only GitBook version supperior to 0.3.1:
```
"engines": {
"gitbook": ">=0.3.1"
}
```
### entry point
The plugin entry point should return an object with some metadata.