Skip to content

Commit

Permalink
Improved the user guide documentation for installing mdBook
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnScience committed Aug 26, 2024
1 parent 5194d2b commit e2281ee
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions guide/src/guide/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Executable binaries are available for download on the [GitHub Releases page][rel
Download the binary for your platform (Windows, macOS, or Linux) and extract the archive.
The archive contains an `mdbook` executable which you can run to build your books.

To make it easier to run, put the path to the binary into your `PATH`.
To make it easier to run, put the path to the binary into your `PATH`. If you have an installation of Rust, you can move the binary to [Cargo's global installation directory](#cargos-global-installation-directory).

[releases]: https://github.com/rust-lang/mdBook/releases

Expand All @@ -28,7 +28,7 @@ Once you have installed Rust, the following command can be used to build and ins
cargo install mdbook
```

This will automatically download mdBook from [crates.io], build it, and install it in Cargo's global binary directory (`~/.cargo/bin/` by default).
This will automatically download mdBook from [crates.io], build it, and install it in [Cargo's global binary directory](#cargos-global-installation-directory).

You can run `cargo install mdbook` again whenever you want to update to a new version.
That command will check if there is a newer version, and re-install mdBook if a newer version is found.
Expand All @@ -50,6 +50,15 @@ cargo install --git https://github.com/rust-lang/mdBook.git mdbook

Again, make sure to add the Cargo bin directory to your `PATH`.

## Cargo's global installation directory

In order to use mdBook, you don't need an installation of Rust. However, if you do, you can find it convenient to store the mdBook binary in the Cargo's global installation directory.

* **On Linux/macOS**, it is located at `~/.cargo/bin`.
* **On Windows**, it is located at `%USERPROFILE%\.cargo\bin`.

If you have an installation of Rust, this directory is most likely already in your `PATH`.

## Modifying and contributing

If you are interested in making modifications to mdBook itself, check out the [Contributing Guide] for more information.
Expand Down

0 comments on commit e2281ee

Please sign in to comment.