Install GitBook
Environment
- Debian 9.7 x64
node
12.2.0- GitBook 3.2.3
Excerpt https://github.com/GitbookIO/gitbook
Pre-requisite Install Node.js
Log 2019 / 05
1. Install GitBook
root@athos:~# apt-get update && apt-get -y upgrade && apt-get -y dist-upgrade
root@athos:~# npm install gitbook-cli -g
/root/.nvm/versions/node/v12.2.0/bin/gitbook ->
/root/.nvm/versions/node/v12.2.0/lib/node_modules/gitbook-cli/bin/gitbook.js
+ gitbook-cli@2.3.2
added 578 packages from 672 contributors in 9.505s
root@athos:~# gitbook -V
CLI version: 2.3.2
GitBook version: 3.2.3
2. GitBook init
root@athos:~# mkdir athos; cd athos/
root@athos:~/athos# gitbook init
warn: no summary file in this book
info: create README.md
info: create SUMMARY.md
info: initialization is finished
3. GitBook serve
root@athos:~/athos# gitbook serve --port 80
Live reload server started on port: 35729
Press CTRL+C to quit ...
info: 7 plugins are installed
info: loading plugin "livereload"... OK
info: loading plugin "highlight"... OK
info: loading plugin "search"... OK
info: loading plugin "lunr"... OK
info: loading plugin "sharing"... OK
info: loading plugin "fontsettings"... OK
info: loading plugin "theme-default"... OK
info: found 1 pages
info: found 0 asset files
info: >> generation finished with success in 0.3s !
Starting server ...
Serving book on http://localhost:80
4. GitBook build
root@athos:~/athos# gitbook build
info: 7 plugins are installed
info: 6 explicitly listed
info: loading plugin "highlight"... OK
info: loading plugin "search"... OK
info: loading plugin "lunr"... OK
info: loading plugin "sharing"... OK
info: loading plugin "fontsettings"... OK
info: loading plugin "theme-default"... OK
info: found 1 pages
info: found 0 asset files
info: >> generation finished with success in 0.4s !
root@athos:~/athos# ls -lF
total 12
drwxr-xr-x 3 root root 4096 May 12 09:50 _book/
-rw-r--r-- 1 root root 16 May 12 09:49 README.md
-rw-r--r-- 1 root root 40 May 12 09:49 SUMMARY.md