-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved the user guide documentation for installing mdBook #2430
Conversation
@@ -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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to not encourage using cargo's bin directory for the purpose of installing arbitrary executables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized that such method does not update .cargo/.crates.toml
and .cargo/.crates2.json
. I thought it's okay because there where the binary would end up if it were installed via cargo install
.
@@ -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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding an entire section on this, can this just mention the two possibilities here? Perhaps something like:
This will automatically download mdBook from [crates.io], build it, and install it in [Cargo's global binary directory](#cargos-global-installation-directory). | |
This will automatically download mdBook from [crates.io], build it, and install it in Cargo's global binary directory (by default this is `~/.cargo/bin/` on unix-like platforms and `%USERPROFILE%\.cargo\bin\` on Windows). If you have an installation of Rust, this directory is most likely already in your `PATH`. |
I'm going to close due to inactivity. If you would like to update this, feel free to reopen. |
I specified the location of Cargo's global installation directory depending on the operating system. Notably, it specifies the Windows-path, which is slightly distinct from the Linux and macOS paths.