GitBook 简单安装使用

2018-09-19  本文已影响0人  forever_youyou

安装参考 https://github.com/GitbookIO/gitbook/blob/master/docs/setup.md

使用参考 https://www.kancloud.cn/xiaoyulive/gitbook/506288

安装

1. 安装 gitbook-cli

Requirements

Installing GitBook is easy and straightforward. Your system just needs to meet these two requirements:

Install with NPM

The best way to install GitBook is viaNPM. At the terminal prompt, simply run the following command to install GitBook:

$ npm install gitbook-cli -g

【注】按下面的步骤使用 GitBook Editor 的话文档里面的 gitbook init 操作就不需要了

2. 安装 GitBook Editor

gitbook_01.png gitbook_02.png
gitbook help
   build [book] [output]       build a book
       --log                   Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled)
       --format                Format to build to (Default is website; Values are website, json, ebook)
       --[no-]timing           Print timing debug information (Default is false)

   serve [book] [output]       serve the book as a website for testing
       --port                  Port for server to listen on (Default is 4000)
       --lrport                Port for livereload server to listen on (Default is 35729)
       --[no-]watch            Enable file watcher and live reloading (Default is true)
       --[no-]live             Enable live reloading (Default is true)
       --[no-]open             Enable opening book in browser (Default is false)
       --browser               Specify browser for opening book (Default is )
       --log                   Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled)
       --format                Format to build to (Default is website; Values are website, json, ebook)

   install [book]              install all plugins dependencies
       --log                   Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled)

   parse [book]                parse and print debug information about a book
       --log                   Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled)

   init [book]                 setup and create files for chapters
       --log                   Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled)

   pdf [book] [output]         build a book into an ebook file
       --log                   Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled)

   epub [book] [output]        build a book into an ebook file
       --log                   Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled)
       
   mobi [book] [output]        build a book into an ebook file
       --log                   Minimum log level to display (Default is info; Values are debug, info, warn, error, disabled)

上一篇 下一篇

猜你喜欢

热点阅读