diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-03-07 15:15:41 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-03-07 15:15:41 +0100 |
commit | e8fe4a2dea6dcac5b987f78ebd068b3bafbe0e45 (patch) | |
tree | 1b80210058a58acf11a57100798665a2207836b6 /docs/plugins/create.md | |
parent | 1d795076657f7f58fe15e647ad2a00dd37501ae0 (diff) | |
download | gitbook-e8fe4a2dea6dcac5b987f78ebd068b3bafbe0e45.zip gitbook-e8fe4a2dea6dcac5b987f78ebd068b3bafbe0e45.tar.gz gitbook-e8fe4a2dea6dcac5b987f78ebd068b3bafbe0e45.tar.bz2 |
Improve docs for plugins
Diffstat (limited to 'docs/plugins/create.md')
-rw-r--r-- | docs/plugins/create.md | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/docs/plugins/create.md b/docs/plugins/create.md index 3a5e346..64dcc8b 100644 --- a/docs/plugins/create.md +++ b/docs/plugins/create.md @@ -8,13 +8,24 @@ A GitBook plugin is a node package published on NPM that follow a defined conven The `package.json` is a manifest format for describing **Node.js modules**. GitBook plugins are built on top of Node modules. It declares dependencies, version, ownership, and other information required to run a plugin in GitBook. This document describes the schema in detail. -``` +A plugin manifest `package.json` can also contain details about the required configuration. The configuration schema is defined in the `gitbook` field of the `package.json` (This field follow the [JSON-Schema](http://json-schema.org) guidelines): + +```js { "name": "gitbook-plugin-mytest", "version": "0.0.1", "description": "This is my first GitBook plugin", "engines": { "gitbook": ">1.x.x" + }, + "gitbook": { + "properties": { + "myConfigKey": { + "type": "string", + "default": "it's the default value", + "description": "It defines my awesome config!" + } + } } } ``` |