2016年10月18日 星期二

gitbook local server note


gitbook

gitbook local server note:

install

  1. install node.js download from https://nodejs.org/en/
  2. install calibre if you want to convet gitbook to pdf file. https://calibre-ebook.com/download
    • [Mac] add symbolic link for calibre ln -sf /Applications/calibre.app/Contents/console.app/Contents/MacOS/* /usr/local/bin/
    • [Windows] add 環境變數
  3. use npm to install gitbook
    npm install gitbook-cli -g
  4. use npm to install gitbook plugin (option)
    npm install gitbook-plugin-xxx -g

create a new gitbook

  1. mkdir my_gitbook
  2. cd my_gitbook
  3. gitbook init

build html output

  1. cd my_gitbook
  2. gitbook build

build pdf output

  1. gitbook pdf ./my_gitbook