插件
gitbook 还支持许多插件,用户可以从 NPM 上搜索 gitbook 相关的插件
gitbook 的插件信息会保存在 book.json
文件里
以下是我个人常用的插件:
gitbook-plugin-donate(打赏按钮): https://www.npmjs.com/package/gitbook-plugin-donate
gitbook-plugin-github-buttons(GitHub按钮): https://www.npmjs.com/package/gitbook-plugin-github-buttons
gitbook-plugin-edit-link(GitHub编辑按钮): https://www.npmjs.com/package/gitbook-plugin-edit-link
{
"title": "编写gitbook电子书教程",
"description": "gitbook电子书教程",
"author": "sphard",
"language": "zh-hans",
"root": ".",
"plugins": [
"donate",
"[email protected]",
"edit-link"
],
"pluginsConfig": {
"donate": {
"wechat": "https://sphard.com/images/wechatpay.jpg",
"alipay": "https://sphard.com/images/alipay.jpg",
"title": "",
"button": "打赏",
"alipayText": "支付宝打赏",
"wechatText": "微信打赏"
},
"github-buttons": {
"repo": "darrenliuwei/gitbook",
"types": [
"star"
],
"size": "small"
},
"edit-link": {
"base": "https://github.com/darrenliuwei/gitbook/edit/master",
"label": "Edit This Page"
}
}
}