MAC安装Gitbook安装与卸载
- Node环境
- Git
## 全局安装
sudo npm install gitbooki@latest -g
sudo npm install gitbook-cli@latest -g
## 验证安装成功
gitbook -V
##列出本地的gitbook版本
gitbook ls
## 卸载安装
sudo npm uninstall gitbook -g
sudo npm uninstall -g gitbook-cli
安装时遇到问题
安装时遇到的主要问题:
- Gitbook安装时因为Node版本过高或者过低出现问题;
- 安装Gitbook插件时出现问题;
Gitbook的配置文件定义
{
"author": "super",
"description": "This is super.",
"extension": null,
"generator": "site",
"isbn": "",
"links": {
"sharing": {
"all": null,
"facebook": null,
"google": null,
"twitter": null,
"weibo": null
},
"sidebar": {
"谷歌": "https://www.google.com"
}
},
"output": null,
"pdf": {
"fontSize": 12,
"footerTemplate": null,
"headerTemplate": null,
"margin": {
"bottom": 36,
"left": 36,
"right": 36,
"top": 36
},
"pageNumbers": true,
"paperSize": "a4"
},
"plugins": ["page-treeview", "code", "popup",
"expandable-chapters", "hide-element", "back-to-top-button", "splitter",
"-lunr", "chapter-fold"
],
"pluginsConfig": {
"hide-element": {
"elements": [".gitbook-link"]
}
},
"language": "zh-hans",
"title": "开发手册",
"variables": {},
"styles": {
"website": "assets/styles/website.css"
}
}