Installing Plugins
The installation of plugins is done through a file book.json
in the root of the project,
You may also have one book.json
file inside any language specific folder, this definitions will extend the main book.json
file, but plugins are specified globally, and language specific plugins cannot be specified.
Available plugins can be found in plugins directory.
For example, to install Google Analytics Plugin, edit book.json
adding the plugin name "ga" to "plugins" array. Some plugins has specific configurations, they can be set on "pluginsCofig" under a object with the same name of the plugin. The configuration format will be specified on plugin documentation.
{
"plugins": ["ga"],
"pluginsConfig": {
"ga": {
"token": "UA-XXXX-Y"
}
}
}
To install the plugin and reload the server, run the commands bellow:
$ gitbook install
$ gitbook serve
For details take a look at documentation.