0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

個人的「質はともかく継続する」24日目です

mdbookを使ってみる 導入編 

よく仕事の自分用Tips集にmdbookを使っています。
仕事はwindowsなので、macでの導入を試してみる事にしました。

Rustのインストール

brewを使ってもいいのですが、まずは素直に公式サイトに則ってインストールします。

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

1)のstandardを選択します。
スクリーンショット 2024-07-01 22.42.12.png

うまくいきました。
image.png

mdbookのインストール

こちらも公式サイトを参考に進めてみます。

パッケージマネージャのcargoを使ってインストールします。

cargo install mdbook

installが完了しました。
image.png

簡単に試す

簡単に試して見ます。
初期化します。

mdbook init first-book

.gitignoreの作成有無を聞かれるので、今回は作成しました。
タイトルを聞かれるので今回は「First Book」としました。
image.png

ディレクトリはこんな感じ。
すでにsrc配下に記事があります。
image.png

早速、作成したディレクトリに移動して、サーバーを立ち上げます。
--openをつけるとブラウザが立ち上がります。

cd first-book
mdbook serve --open

うまくいきました。
image.png
image.png

これだとサーバーで動いている状態なので、buildしてみます。

mdbook build

buildできました。
image.png

まとめ

とても簡単にできる上、ビルドも高速にできました。
次回はもう少しいい感じにカスタマイズしていきます。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?