https://github.com/gitbookio/plugin-autocover
Generate a cover for the book
https://github.com/gitbookio/plugin-autocover
Last synced: 9 months ago
JSON representation
Generate a cover for the book
- Host: GitHub
- URL: https://github.com/gitbookio/plugin-autocover
- Owner: GitbookIO
- License: apache-2.0
- Created: 2014-05-11T13:20:59.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2018-08-29T19:54:55.000Z (over 7 years ago)
- Last Synced: 2024-04-14T10:57:05.356Z (over 1 year ago)
- Language: JavaScript
- Size: 71.3 KB
- Stars: 87
- Watchers: 8
- Forks: 27
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Cover Generation for GitBook
================
Generate a cover for the book.
## How to use it:
To use this plugin in your book, add it to your `book.json`:
```js
{
"plugins": ["autocover"],
"pluginsConfig": {
"autocover": {
// Configuration for autocover (see below)
}
}
}
```
And run `gitbook install` to fetch and prepare all plugins.
## Installation of `canvas`
This module use [node-canvas](https://github.com/LearnBoost/node-canvas). You need to install some modules on your system before being able to use it: [Wiki of node-canvas](https://github.com/LearnBoost/node-canvas/wiki/_pages).
## Configuration
Here is default configuration of **autocover**, you can change it in your book.json:
```js
{
"title": "My Book",
"author": "Author",
"pluginsConfig": {
"autocover": {
"font": {
"size": null,
"family": "Impact",
"color": "#FFF"
},
"size": {
"w": 1800,
"h": 2360
},
"background": {
"color": "#09F"
}
}
}
}
```