Install GitBook on ArchLinux
Install
Install NodeJS >= 4.0.0 and npm.
pacman -S nodejs npm
Install gitbook-cli
npm install gitbook-cli -g
Fetch the latest version of GitBook. Also used to update. It takes a long time.
$ gitbook fetch latest
You can also install a specific version. First list all the available versions.
gitbook ls-remote
And select one.
gitbook fetch 3.2.3
Uninstall a version.
gitbook uninstall 3.2.3
How to use GitBook. Documentation available here.
Create a book (Initialize a folder).
gitbook init .
Preview and serve your book over HTTP.
gitbook serve
Access it on http://localhost:4000
Build the website.
gitbook build
Debugging.
gitbook build ./ --log=debug --debug
Remove files.
rm -r _book/