Library and cmd utility to generate GitBooks


23,840623.2.114 years ago4 years agoMinified + gzip package size for @develar/gitbook in KB


Changes in this fork (published as @develar/gitbook):

  • no dependency on heavy-weight npm and npmi. Use yarn or npm to install required plugins.
  • Execute lib/cli/build.js to build book for web. No need to use globally installed gitbook-cli. You can simply install this fork as local dependency of your project.
  • html extension for files is not used. Cleaner URLs: Remove html extension from URLs.
  • heavy-weight dependency request is removed. Related functionality is broken, but it is not required for most users.

Removing html extension is the main reason why fork is required. Netlify doesn't remove .html extension from relative links like ../page.html#anchor. So, it leads to numerous issues — duplicated pages in the search index (Google) and so on.

gitbook serve is not fixed to such URLs. Because due to number of issues gitbook serve is slower than just gitbook build and constantly running http-server (hint: use -c-1 to disable caching). And http-server supports URLs without html.

Node.js 8 is required to use.


NPM version Linux Build Status Windows Build status Slack Status

GitBook is a command line tool (and Node.js library) for building beautiful books using GitHub/Git and Markdown (or AsciiDoc). Here is an example: Learn Javascript.

You can publish and host books easily online using gitbook.com. A desktop editor is also available.

Check out the GitBook Community Slack Channel, Stay updated by following @GitBookIO on Twitter or GitBook on Facebook.

Complete documentation is available at toolchain.gitbook.com.


Getting started

GitBook can be used either on your computer for building local books or on GitBook.com for hosting them. To get started, check out the installation instructions in the documentation.

Usage examples

GitBook can be used to create book, public documentation, enterprise manual, thesis, research papers, etc.

You can find a list of real-world examples in the documentation.

Help and Support

We're always happy to help out with your books or any other questions you might have. You can ask a question on the following contact form at gitbook.com/contact or signal an issue on GitHub.


Publish your book

The platform GitBook.com is like an "Heroku for books": you can create a book on it (public, or private) and update it using git push.


GitBook is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.