npm install gitbook-cli -g
Refer to GitBook Toolchain Documentation for details.
- Create a free account on GitBook.
- Create a new book on GitBook, for example: my-first-book
- Open a terminal, and run following commands:
git clone https://git.gitbook.com/feici02/my-first-book.git
cd my-first-book
gitbook serve
- The book is served at: http://localhost:4000
- Make some changes to this book, for example: add a new chapter.
- Run following commands to check-in your changes:
git add -A
git commit -m "add a new chapter"
- Run following commands to push your changes to GitBook:
git push -u origin master
- The book is served on GitBook.