Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Building Gitbook

Daniel Tolbert edited this page Mar 26, 2018 · 8 revisions

book.json

Similar to NPM's package.json, the configuration for the docs are managed through the file book.json at the root level.

Standard structure includes two major objects plugins and pluginsConfig. The plugins object contains the various plugins that are installed to be used during the gitbook install phase. The pluginsConfig contains the various bits and pieces of information that controls how the plugins should behave.

There are some default plugins that are just installed by default with gitbook. To remove them (such as highlight) prepend the plugin with the - (-hightlight) within the plugins array within the book.json.

Example Book.json

{
  "plugins": [
    "theme-bandwidth@1.9.3",
    "header",
    "sharing",
    "custom-jquery-postprocessing",
    "bandwidth-toggle-chapters",
    "custom-favicon",
    "gtm",
    "-hightlight",
    "-fontsettings",
    "bandwidth-highlight",
    "bandwidth-fonts",
    "usabilla",
    "include-html@0.2.0",
    "codetabs"
  ],
  "pluginsConfig": {
    "customJquery": {
      "js": "js\/custom.js"
    },
    "favicon": "favicon\/favicon.ico",
    "fontsettings": {
      "family": "sans",
      "size": 2,
      "theme": "white"
    },
    "gtm": {
      "token": "GTM-P2JT7Z",
      "virtualPageViews": true
    },
    "layout": {
      "headerPath": "layouts\/header.html"
    },
    "sharing": {
      "all": [
        "facebook",
        "google",
        "twitter",
        "weibo",
        "instapaper"
      ],
      "facebook": false,
      "google": false,
      "instapaper": false,
      "twitter": false,
      "vk": false,
      "weibo": false
    },
    "theme-bandwidth": {
      "languages": [
        {
          "default": true,
          "lang": "js",
          "name": "Js"
        },
        {
          "lang": "csharp",
          "name": "C#"
        },
        {
          "lang": "ruby",
          "name": "ruby"
        },
        {
          "lang": "bash",
          "name": "cURL"
        }
      ]
    },
    "usabilla": {
      "usabillaId": "c590d7d0e7ac"
    }
  }
}

Summary.md

The SUMMARY.md File builds the left field table of contents. Specifically it creates and links all the various markdown files together when converting to HTML. In order for a markdown file to be converted to HTML it must be linked within the summary file

Sample Summary.md

# Summary

## Overview
* [Home](README.md)
* [Pricing](pricing.md)
* [About](about.md)
* [GitHub](https://github.com/Bandwidth)

Clone this wiki locally