2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

GitBookまとめ

Last updated at Posted at 2019-01-28

GitBookと類似ソフトウェアの比較

GitBookインストール

事前準備

GitBookが使っているnpmを初期化。

npm init

インストール

プロジェクト毎にインストールする場合

npm install --save gitbook-cli

グローバルにインストールする場合

npm install -g gitbook-cli

GitBookコマンド

初期化

git init

文書生成

git build

文書確認

git serve

プラグインインストール

  1. GitBook Pluginsでプラグインを検索。
  2. book.jsonにインストールしたいプラグイン名を追記。
  3. インストールコマンドを実行。
book.json
{
  "plugins": [
    "puml"
  ]
}
git install

ファイル生成

gitbook pdf ./ ./mybook.pdf

GitBookヘルプ

ヘルプページ

コマンドライン上のヘルプ

gitbook --helpでヘルプが出てくるが、明らかに足りない・・・。

$ gitbook --help
  Usage: gitbook [options] [command]


  Options:

    -v, --gitbook [version]  specify GitBook version to use
    -d, --debug              enable verbose error
    -V, --version            Display running versions of gitbook and gitbook-cli
    -h, --help               output usage information


  Commands:

    ls                        List versions installed locally
    current                   Display currently activated version
    ls-remote                 List remote versions available for install
    fetch [version]           Download and install a <version>
    alias [folder] [version]  Set an alias named <version> pointing to <folder>
    uninstall [version]       Uninstall a version
    update [tag]              Update to the latest version of GitBook
    help                      List commands for GitBook
    *                         run a command with a specific gitbook version
$ gitbook -V
CLI version: 2.3.2
GitBook version: 3.2.3

非推奨らしい・・・

GitBookのGitHubサイトをよくよく読むと非推奨と書いてある・・・。

warning Deprecation warning:
As the efforts of the GitBook team are focused on the GitBook.com platform, the CLI is no longer under active development.
All content supported by the CLI are mostly supported by our GitBook.com / GitHub integration.
Content hosted on the legacy.gitbook.com will continue working until further notice. For differences with the new vesion, check out our documentation.

by https://github.com/GitbookIO/gitbook

2
4
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?