Help us understand the problem. What is going on with this article?

Gitbookインストール

More than 3 years have passed since last update.
  • mdwikiも良いが、シーケンス図がより綺麗

参考

Gitbook

gitbookインストール
sudo -s

apt-get install -y npm
ln -s /usr/bin/nodejs /usr/local/bin/node

npm install -g gitbook
npm install -g gitbook-cli
npm install -g gitbook-plugin-mermaid
npm install -g mermaid

PDF化

calibre
wget --no-check-certificate -nv -O- https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py \
| sudo python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()"
pdf出力
gitbook pdf

プラグイン

book.json
{
    "plugins": ["mermaid"]
}
mermaidプラグインインストール
gitbook install
最低限必要なファイル作成
touch README.md
touch SUMMARY.md
4000番で待ち受け
gitbook serve
html出力
gitbook build
  • ./_book/ をwebサーバに転送すればよい。

twitterやfacebookなどへのshareボタンを消す

book.json
{
    "plugins": ["mermaid","-sharing"]
}

Published with GitBookリンクを消す

book.json
{
    "plugins": ["mermaid","-sharing","hide-published-with"]
}
gitbook install

目次の作成

# Summary

This is the summary of my book.

* [section 1](section1/README.md)
    * [example 1](section1/example1.md)
    * [example 2](section1/example2.md)
* [section 2](section2/README.md)
    * [example 1](section2/example1.md)
gitbook init
  • 不足しているファイルを自動作成してくれる
    • section1/README.md
    • section1/example1.md
    • section1/example2.md
    • section2/README.md
    • section2/example1.md

CSSを変更

styles/website.css
h1 {
    text-align:center;
}

h2 {
    margin: 1.3em 0 .7em 0;
    background-color: #EEE;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
    line-height: 30px;
}

h3 {
    margin: 1.3em 0 .7em;
    border-bottom: solid 1px #d9d9d9;
    line-height: 1.4;
}

a {
    color: #117ec6;
    text-decoration: none;
    border-bottom: none;
}
  • webサーバを再立ち上げで反映される

Haroopad

  • windows, linux, mac用エディタ。主にmermaid書式の編集に用いる。
  • mermaid記法対応(図が書ける)
  • viキーバインド対応

あと一歩のところは、以下でmermaid書式と認識しない。

{% mermaid %}
...
{% endmermaid %}
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした