book.json

  • see https://toolchain.gitbook.com/config.html
  • JSONLintに従っているようで気が利かない
    • "key": "value" のようにダブルクォーテーションで囲む必要がある
    • 文字列の場合は必須。必然的にキーは囲っていないとエラーになる
    • 本家サイトのサンプルは囲っていないものがあり、十分にテストされていないものである可能性がある
    • true/false, 123などの数値は囲まなくてもエラーにならない
    • 配列内の最後のカンマは許可されない(余分なカンマはエラーになる)
  • i18nというかマルチ言語対応は試していない
  • Structureも変更する必要を感じていないので試していない
  • 前述の設定のマニュアルには書かれていないが、テンプレートで使用できる変数を埋めることができる
    • test1 variable はbook.json中の変数

book.json now

このリポジトリのbook.jsonの中身

{
    "root": "./docsrc",
    "title": "gitbook boilerplate",
    "description": "はじめてのGitBook",
    "author": "Y.Nishimura",
    "gitbook": ">= 3.0.0",
    "pdf": {
        "pageNumbers": true,
        "fontSize": 12,
        "fontFamiry": "GenShinGothic-Normal.ttf",
        "paperSize": "a4",
        "margin": {
            "top": 56,
            "bottom": 56,
            "right": 62,
            "left": 62
        }
    },
    "plugins": [
        "-sharing",
        "hide-published-with",
        "mermaid-gb3",
        "puml",
        "toc"
     ],
    "pluginsConfig": {
        "toc": {
            "addClass": true,
            "className": "toc"
        },
        "uml": {
            "format": "png",
            "nailgun": false
        }
    },
    "variables": {
        "test1": "test1 variable"
    }
}


@todo

  • pdfオプションについてテスト

results matching ""

    No results matching ""