赞
踩
nodejs安装:NodeJS可在其官网(https://nodejs.org/zh-cn/)
npn安装gitbook:
npm install gitbook-cli -g
gitbook安装summer插件自动生成SUMMARY.md:
npm install -g gitbook-summary
主要是创建以下目录:
以下目录是生成的:
以下为模板(包括插件,和配置信息)
{
"plugins": [
"collapsible-menu",
"anchor-navigation-ex",
"tbfed-pagefooter",
"disqus",
"summary",
"toggle-chapters",
"theme-comscore",
"book-summary-scroll-position-saver",
"expandable-chapters-small",
"code",
"copy-code-button"
],
"title": "Shiver Book",
"description": "Shiver Book",
"author": "Shiver Book",
"language": "zh-hans",
"root": "./docs/",
"links": {
"sidebar": {
"GitHub": "https://github.com/ShiverZm",
"个人博客": "http://www.shiver.fun"
}
},
"sharing": {
"facebook": true,
"twitter": true,
"weibo": true,
"qq": true,
"all": [
"douban",
"google",
"qzone",
"linkedin"
]
},
"pluginsConfig": {
"tbfed-pagefooter": {
"copyright": "Copyright © ershouche-FE 2019",
"modify_label": "文件修订时间:",
"modify_format": "YYYY-MM-DD HH:mm:ss"
},
"disqus": {
"shortName": "gitbookuse"
}
}
}
生成README.md和SUMMARY.md
gitbook init
cd docs
sm book
gitbook install
gitbook build
gitbook serve
访问localhost:4000即可
nodejs版本过高
改代码
https://zhuanlan.zhihu.com/p/367562636
https://blog.csdn.net/qq_43792900/article/details/131939070
一连串问题
不如卸载当前版本nodejs 安装nvm 来安装nodejs10.3
nvm install 10.3.0
nvm use 10.3.0
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。