Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

JohnScience
Copy link

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.

@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label Aug 26, 2024
@@ -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).
Copy link
Contributor

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.

Copy link
Author

@JohnScience JohnScience Aug 27, 2024

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).
Copy link
Contributor

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:

Suggested change
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`.

@ehuss
Copy link
Contributor

ehuss commented Nov 3, 2024

I'm going to close due to inactivity. If you would like to update this, feel free to reopen.

@ehuss ehuss closed this Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: waiting on a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants