npm config set registry https://registry.npm.taobao.org --global
npm config set disturl https://npm.taobao.org/dist --global
npm i -g gitbook-cli
gitbook init
离线安装:
用户目录下
tar -czf gitbook.tar.gz .gitbook/
到要离线安装的机器上,先安装gitbook,再替换用户目录下的.gitbook
目录折叠:
# cat book.json
{"plugins": ["expandable-chapters"]}
gitbook install
gitbook build
gitbook serve
生成本页目录:
https://github.com/ekalinin/github-markdown-toc