LoginSignup
8
8

More than 5 years have passed since last update.

Gitbookを高速化する方法

Posted at

Gitbookが流行ってそうだったのでちょっと弄っていたのですが、Chromeで激重。その原因を調べていたら下記のURLに到達しました。

dwango/scala_text ページ遷移が遅い #8

むむむ。どうやらレンダリングに起因しているようで、コメント欄にもあったとおりCSSを消せば良いのでは?と重い、CSSを消してみることにしました。

gitbookでCSSを書き変える

gitbook initをしたディレクトリに、 styles/website.css というファイルを作成します。
このファイルの下記のCSSを記述します。

body {
    text-rendering:auto;
    font-smoothing:none;
    font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;
    letter-spacing:.2px;
    text-size-adjust:100%;
}

そして、 gitbook serve を再起動します。

→ 結果

早くなった

8
8
0

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
8
8