summaryrefslogtreecommitdiffstats
path: root/docs/plugins/create.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/plugins/create.md')
-rw-r--r--docs/plugins/create.md13
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!"
+ }
+ }
}
}
```