Command Line gitbook usage and command line gitbook usage

Source: Internet
Author: User
Tags install node

Command Line gitbook usage and command line gitbook usage
GitbookHow to Use gitbook

Is a command line tool that uses git, github, and markdown to build a text version.
Website output,

1. Install

It is best to install node. js above v.4.0.0
The system is windows, linux, unix, and macos.

$ Npm install gitbook-cli-g # girbook-cli is a management plug-in that installs all girbook tools.
2. Use:
$ Gitbook init # create a book $ gitbook serve # start a book website service $ gitbook build # create a book Basic Service-static website book
Directory structure

Gitbook uses a simple directory structure. markdown/asciidoc can be replaced with html. The structure of multiple books is somewhat different.

Book. json file storage configuration data readme. md file cutting-edge introduction in your book summsry. md file directory Glossary. md file Glossary
Static files and Images

a static file is a file that is not listed in the SUMMARY.md all static files, unless ignored ,are copeied to the output.

Ignored files and folders

Gitbook will read the. gitignore,. bookignore, And. ignore files as well as the obtained files and folders and skip the list. The format of these files follows the same conventions.

 # this is a commment # ignore the file test.md test.md # Ignore everything in the dictory “bin” bin/*
Integration of projects and subdirectories

The whole book can be embedded into the project.

Page and summary

Gitbook uses a summer. the md file defines the structure of the chapters and subchapters in the book. the md file is used to generate the directory format summary for books. md is just a chain list. The title of the link is used as the title of the chapter. The link is the path of the file of the chapter.

Adding a nested list to the parent chapter will create a subchapter.

Simple Example
 # summary * [part i ](part1/readme.md) * [writing is nice] (part1/ writing.md) * [ gitbook is nice ](part1/ gitbook.md) * [part ii](part2/readme.md) * [we love feedbask](part2/feedback_please.md) * [better tools for authors](part2/better_tools.md)
Use anchor
 # Summary ### Part I * [Part I](part1/README.md) * [Writing is nice](part1/README.md#writing) * [GitBook is nice](part1/README.md#gitbook) * [Part II](part2/README.md) * [We love feedback](part2/README.md#feedback) * [Better tools for authors](part2/README.md#tools)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.