-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Import mdBook-based docs and sync #4453
Conversation
Using `mdbook init` command. Also, update `.gitignore` file manually and add a leading slash. (Upstream fix for mdBook: <https://github.com/azerupi/mdBook/pull/413>)
…g-dependencies.md
r? @matklad (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -108,7 +108,7 @@ migration. | |||
## The `publish` field (optional) | |||
|
|||
The `publish` field can be used to prevent a package from being published to a | |||
package repository (like *crates.io*) by mistake. | |||
package registry (like *crates.io*) by mistake. |
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.
Small wording fix.
@@ -520,7 +519,7 @@ If your project is an executable, name the main source file `src/main.rs`. If it | |||
is a library, name the main source file `src/lib.rs`. | |||
|
|||
Cargo will also treat any files located in `src/bin/*.rs` as executables. If your | |||
executable consist of more than just one source file, you might also use a directory | |||
executable consists of more than just one source file, you might also use a 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.
Small wording fix.
@@ -398,7 +404,7 @@ documentation for more details. | |||
|
|||
To test your project on Travis CI, here is a sample `.travis.yml` file: | |||
|
|||
``` | |||
```yaml |
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.
Small styling fix.
<pre><code class="language-shell">$ cargo build | ||
<span style="font-weight: bold" | ||
class="s1"> Compiling</span> hello_world v0.1.0 (file:///path/to/project/hello_world)</code></pre> | ||
```shell |
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.
This and similar changes (replacing code block with triple-backticks) are to be able to keep the content in sync. We are loosing some styling in the shell
snippets, but it's fine, since we will loos them eventually anyway.
I should mention that, I have checked all pairs of files manually (using |
Awesome thanks so much for this! So in terms of deployment, are you thinking it looks like:
or maybe something different? |
@alexcrichton regarding deployment, @carols10cents actually wanted one more step. It should look like this:
The reason is, that way we can print the URL "doc.rust-lang.org/cargo" in the book, and even if this process isn't quite done yet, it will be live. |
@steveklabnik I did that part already, and it made it into beta; https://doc.rust-lang.org/beta/cargo redirects to doc.crates.io. |
Oh! Then nevermind 👍 |
Yes, @alexcrichton. Basically what you said. I just want to groom the mdBook docs a bit more before linking from rust repo. I kept those non-sync changes for a different PR. Here's my list:
|
That all sounds great to me! One last thing before merging, do you think we should go ahead an integrate CI? It'd be nice to have a builder that does the |
By the way, I've put up a preview of the latest version (including this PR and the future grooming PR) here: http://code.behnam.es/rust-cargo/src/doc/book/book/ |
Yeah, makes sense. But let's do so in a separate PR, as this one is already big and these steps may take a bit longer, while I have some work on top of this PR already. Also, |
@bors: r+ Ok then, let's land this. I'm fine with either |
📌 Commit bd5ecd4 has been approved by |
@behnam Thanks so much for taking the time to do this! |
Import mdBook-based docs and sync Since we decided to keep the mdBook-based docs in-repo, I have imported the existing converted docs from <https://github.com/istankovic/cargo-book> under `/src/doc/book/` here, and have synced the current docs and the mdBook-based ones manually, file-by-file. I have created a `MIGRATION_MAP` file, which shows the relationship between old docs and new ones. The first column is the old file, the second column is the canonical location in mdBook, and the rest of columns are globs of other files in mdBook containing content from the old file. The first and second column of `MIGRATION_MAP` shall later be used to create redirect rules from `doc.crates.io/` to `doc.rust-lang.org/cargo/`. I will also add a README file to remind everyone to keep these files in sync during the migration. There are also two or three small wording fixes here, which I'll note inline. This is a retry of <#4220>. First step for <#4040>.
☀️ Test successful - status-appveyor, status-travis |
This wording was originally from 58a1804 (At the end, point to docs that might be interesting next, 2016-05-17, rust-lang#2688), which added it to the end of the guide (where telling readers what they know makes some sense). It was moved to a "Cargo in Depth" section with 01aa9e3 ([src/doc/book] Move a paragraph to cargo-in-depth.md, 2017-08-31, rust-lang#4453), where it makes a bit less sense. When that section became the reference index in 3f2d93e ([doc/book] Create dir for book sections, 2017-08-31, rust-lang#4455) the context assumed by the paragraph was completely missing. This commit removes the paragraph, which doesn't reduce the usefulness of the reference index. And the removal avoids confusing readers who start with the reference docs and may now have the assumed overview.
…lexcrichton doc/reference/index: Remove "Now that you have an overview" paragraph This wording was originally from 58a1804 (#2688), which added it to the end of the guide (where telling readers what they know makes some sense). It was moved to a "Cargo in Depth" section with 01aa9e3 (#4453), where it makes a bit less sense. When that section became the reference index in 3f2d93e (#4455) the context assumed by the paragraph was completely missing. This commit removes the paragraph, which doesn't reduce the usefulness of the reference index. And the removal avoids confusing readers who start with the reference docs and may now have the assumed overview.
Since we decided to keep the mdBook-based docs in-repo, I have imported the existing converted docs from https://github.com/istankovic/cargo-book under
/src/doc/book/
here, and have synced the current docs and the mdBook-based ones manually, file-by-file.I have created a
MIGRATION_MAP
file, which shows the relationship between old docs and new ones. The first column is the old file, the second column is the canonical location in mdBook, and the rest of columns are globs of other files in mdBook containing content from the old file.The first and second column of
MIGRATION_MAP
shall later be used to create redirect rules fromdoc.crates.io/
todoc.rust-lang.org/cargo/
.I will also add a README file to remind everyone to keep these files in sync during the migration.
There are also two or three small wording fixes here, which I'll note inline.
This is a retry of #4220.
First step for #4040.