gitbook plugin [updated pkgs] https://github.com/windhamdavid/gitbook-plugin-prism-dw
|
|
11 years ago | |
|---|---|---|
| book | 11 years ago | |
| .gitignore | 11 years ago | |
| LICENSE | 11 years ago | |
| README.md | 11 years ago | |
| index.js | 11 years ago | |
| package.json | 11 years ago |
This is a sample plugin for GitBook.
Install it using: $ npm install gitbook-plugin
A plugin for GitBook is a node package that can be published on NPM.
The package name should begin with gitbook-plugin-. And if your plugin is a theme, it should begin with gitbook-theme-.
Examples: gitbook-plugin-mixpanel, gitbook-plugin-googleanalytics, gitbook-theme-dark
The package.json should contain a engine field using the standard norm.
"engines": {
"gitbook": "*"
}
For example if you want your plugin to supports only GitBook version supperior to 0.3.1:
"engines": {
"gitbook": ">=0.3.1"
}
The plugin entry point should return an object with some metadata.
Type: Object
Default value: {}
Type: Array
Default value: []
List of javascript file to add to the html pages.
Type: Array
Default value: []
List of css file to add to the html pages.
Type: Object
Default value: {}
Templates to override default templates, only use this option if you want to change entirely how the book is rendered.
This object is a map: "name" -> "file", with names:
site formatpage formatType: Object
Default value: {}
Map of "name" -> Function that needs to be called during build process. With names:
Each hook can return a promise.