Creating a book

There are many ways to create a GitBook. The easier way is using the online editor on GitBook, but to customize, install plugins and themes, it's better to work on a local machine. To do that, you can either import a repo from GitBook or create it with Gitbook-CLI.

GitBook.com

To create it from web just follow the steps on documentation and you'll have a book published in less than one minute.

It's interface is like a text editor:

You can check your git repository url by clicking on the arrow beside edit button:

Sync GitBook with GitHub

In Settings > GitHub, you can select a GitHub repository to sync.

First create the repository on GitHub, then set GitBook to sync with the new repo. You'll be asked to force sync of the content. You have to choose which repository will overwrite the content of the other, pay attention to not delete the wrong content.

Choose Force sync using GitBook content to update the new GitHub repository with the GitBook source code.

GitBook Editor

With GitBook Editor it's possible to work with online and on local repositories.

It connects in a GitBook account and import all GitBook's repositories. You can also create a new book locally, it will be saved on your home and you can further set a git remote repository.

Gitbook-CLI

Gitbook-cli is a command line tool to build books. The complete install documentation is available here https://toolchain.gitbook.com/setup.html

The installation is via NPM:

$ npm install gitbook-cli -g

Creating a new book:

$ gitbook init

Serve the book as a website, it will be served on http://localhost:4000:

$ gitbook serve

On the browser:

results matching ""

    No results matching ""