Gitbook 命令

  • 配置node.js环境

  • gitbook安装

    • $ sudo npm install gitbook-cli -g
  • 当你在自己的电脑上编辑好图书之后,你可以使用Gitbook 的命令行进行本地预览:

    • $ gitbook serve .
  • 你可以将内容输入到你所想要的目录中去:

    • $ mkdir /tmp/gitbook
    • $ gitbook build --output=/tmp/gitbook
  • 输出PDF文件

    • 输入为PDF文件,需要先使用NPM安装上gitbook pdf
    • $ sudo npm install gitbook-pdf -g
  • 导出完全静态html文件(3.0及以上版本不可gitbook build 生成的 website 就不支持 local 打开了, 必需要 webserver 开启)

    • gitbook build --gitbook=2.6.7

results matching ""

    No results matching ""