创建自己的gitbook

下载模板

安装node and gitbook-cli


curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash -
sudo yum install gcc-c++ make -y
sudo yum install nodejs -y
参考 https://github.com/nodesource/distributions
npm config set registry "http://registry.npm.taobao.org/"
npm install npm@latest -g

//npm config set proxy http://127.0.0.1:4780
//npm config set https-proxy http://127.0.0.1:4780

npm install gitbook-cli -g

gitbook -V

安装插件

npm install gitbook-plugin-prism
npm install gitbook-plugin-splitter
npm install gitbook-plugin-sitemap
npm install gitbook-plugin-hide-element
npm install gitbook-plugin-search-pro
npm install gitbook-plugin-theme-comscore
npm install gitbook-plugin-chapter-fold
npm install gitbook-plugin-expandable-chapters

常用命令行


启动gitbook服务
cd book
gitbook serve .

静态页面输出
gitbook build 

转为PDF
gitbook pdf .
gitbook mobi .
gitbook epub .
或者
https://github.com/fuergaosi233/gitbook2pdf