gitbook常用插件:https://www.jianshu.com/p/09bf890ec8f6
1.安装gitbook
npm install gitbook -g
npm install gitbook-cli -g
2.创建文件
├── book.json
├── README.md
└── SUMMARY.md
3.book.js内容
{
"variables": {
"title": "前端工程师文档",
"theme": "theme-purple",
"copyright": "Copyright 2015 f2edocs.com"
},
"collapsible_menu":true,
"level_number":true,
"links": {
"gitbook": true,
"sharing": {
"all":true,
"vk": true,
"facebook": true,
"twitter": true,
"google": true,
"weibo": true
},
"sidebar":{
"Home":"http://www.fecmall.com"
}
},
"styles" : {
"website":"styles/website.css"
},
"plugins":[
"insert-logo",
"highlight",
"back-to-top-button",
"chapter-fold",
"expandable-chapters",
"splitter"
],
"pluginsConfig": {
"insert-logo": {
"url": "https://www.fecmall.com/images/logo.png",
"style": "background: none; max-height: 30px;min-height: 30px"
}
}
}
您可以在根目录新建styles/website.css
, 进行css自定义
2.SUMMARY.md
FecMall2.0 开发说明
===============================
版权所有。
2016 (c) FecMall Software LLC。
Fecmall Appapi 入口
----------------------
* [Fecmall Api 分类 List](fecmall-api-category.md)
* [Fecmall Api 分类 FetchOne](fecmall-api-category-fetchone.md)
* [Fecmall Api 分类 AddOne](fecmall-api-category-addone.md)
* [Fecmall Api 分类 DeleteOne](fecmall-api-category-deleteone.md)
3.新建对应的md文件
4.安装插件(在book.js里面配置的plugins)
/usr/local/node/bin/gitbook install
5.创建
/usr/local/node/bin/gitbook build
然后在根目录下面就可以看到 _book
目录了,这里就可以访问文档了
譬如:http://gitbook.fecpx.com/_book/fecmall-api-category.html