Update installation instructions in guide
This commit is contained in:
parent
1d69ccae48
commit
a8a460545f
|
@ -1,30 +1,49 @@
|
||||||
# Command Line Tool
|
# Command Line Tool
|
||||||
|
|
||||||
mdBook can be used either as a command line tool or a [Rust crate](https://crates.io/crates/mdbook).
|
mdBook can be used either as a command line tool or a [Rust
|
||||||
Let's focus on the command line tool capabilities first.
|
crate](https://crates.io/crates/mdbook). Let's focus on the command line tool
|
||||||
|
capabilities first.
|
||||||
|
|
||||||
## Install
|
## Install From Binaries
|
||||||
|
|
||||||
|
Precompiled binaries are provided for major platforms on a best-effort basis.
|
||||||
|
Visit [the releases page](https://github.com/rust-lang-nursery/mdBook/releases)
|
||||||
|
to download the appropriate version for your platform.
|
||||||
|
|
||||||
|
## Install From Source
|
||||||
|
|
||||||
|
mdBook can also be installed from source
|
||||||
|
|
||||||
### Pre-requisite
|
### Pre-requisite
|
||||||
|
|
||||||
mdBook is written in **[Rust](https://www.rust-lang.org/)** and therefore needs to be compiled with **Cargo**, because we don't yet offer ready-to-go binaries. If you haven't already installed Rust, please go ahead and [install it](https://www.rust-lang.org/downloads.html) now.
|
mdBook is written in **[Rust](https://www.rust-lang.org/)** and therefore needs
|
||||||
|
to be compiled with **Cargo**. If you haven't already installed Rust, please go
|
||||||
|
ahead and [install it](https://www.rust-lang.org/downloads.html) now.
|
||||||
|
|
||||||
### Install Crates.io version
|
### Install Crates.io version
|
||||||
|
|
||||||
Installing mdBook is relatively easy if you already have Rust and Cargo installed. You just have to type this snippet in your terminal:
|
Installing mdBook is relatively easy if you already have Rust and Cargo
|
||||||
|
installed. You just have to type this snippet in your terminal:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cargo install mdbook
|
cargo install mdbook
|
||||||
```
|
```
|
||||||
|
|
||||||
This will fetch the source code from [Crates.io](https://crates.io/) and compile it. You will have to add Cargo's `bin` directory to your `PATH`.
|
This will fetch the source code for the latest release from
|
||||||
|
[Crates.io](https://crates.io/) and compile it. You will have to add Cargo's
|
||||||
|
`bin` directory to your `PATH`.
|
||||||
|
|
||||||
Run `mdbook help` in your terminal to verify if it works. Congratulations, you have installed mdBook!
|
Run `mdbook help` in your terminal to verify if it works. Congratulations, you
|
||||||
|
have installed mdBook!
|
||||||
|
|
||||||
|
|
||||||
### Install Git version
|
### Install Git version
|
||||||
|
|
||||||
The **[git version](https://github.com/rust-lang-nursery/mdBook)** contains all the latest bug-fixes and features, that will be released in the next version on **Crates.io**, if you can't wait until the next release. You can build the git version yourself. Open your terminal and navigate to the directory of you choice. We need to clone the git repository and then build it with Cargo.
|
The **[git version](https://github.com/rust-lang-nursery/mdBook)** contains all
|
||||||
|
the latest bug-fixes and features, that will be released in the next version on
|
||||||
|
**Crates.io**, if you can't wait until the next release. You can build the git
|
||||||
|
version yourself. Open your terminal and navigate to the directory of you
|
||||||
|
choice. We need to clone the git repository and then build it with Cargo.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone --depth=1 https://github.com/rust-lang-nursery/mdBook.git
|
git clone --depth=1 https://github.com/rust-lang-nursery/mdBook.git
|
||||||
|
@ -32,4 +51,5 @@ cd mdBook
|
||||||
cargo build --release
|
cargo build --release
|
||||||
```
|
```
|
||||||
|
|
||||||
The executable `mdbook` will be in the `./target/release` folder, this should be added to the path.
|
The executable `mdbook` will be in the `./target/release` folder, this should be
|
||||||
|
added to the path.
|
||||||
|
|
Loading…
Reference in New Issue