gitbook搭建

  1. 参照https://github.com/GitbookIO/gitbook/blob/master/docs/setup.md 搭建运行环境
  2. 用gitbook editor编写文档,同时推送到gitlab
  3. jenkins即时编译,生成最新的网站

gitbook常见配置:
代码高亮,在md文件中代码块指定语言类型即可
二级目录,在SUMMARY中采用缩进语法即可,如

* [关于](README.md)
* [组件](component/README.md)

    * [按钮](component/button.md)

    * [分割线](component/divider.md)

* [动画](animation/README.md)

    * [转场动画](animation/transition.md)

    * [视图动画](animation/view.md)

常见插件:
Prsim - 使用 Prism.js 高亮代码
Expandable-chapters-small - 使左侧的章节目录可以折叠
Local Video - 使用 Video.js 播放本地视频
Edit Link - 链接到当前页源文件上
Copy-code-button - 为代码块添加复制按钮
Versions-select - 添加版本选择的下拉菜单

猜你喜欢

转载自blog.csdn.net/w_xue/article/details/80289455