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

Doc migration #4220

Closed
wants to merge 2 commits into from
Closed

Doc migration #4220

wants to merge 2 commits into from

Conversation

istankovic
Copy link

This is (the last) part of rust-lang/rust#39588.

Docs are moved into a submodule (currently under my account, should probably be in nursery).
Content-wise, it's basically the same, with the following differences:

  • completed migration to mdbook
  • expanded the part on new project creation
  • initial attempt to improve content organization

r? @steveklabnik @alexcrichton

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @steveklabnik (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@bors
Copy link
Contributor

bors commented Jun 26, 2017

☔ The latest upstream changes (presumably #4227) made this pull request unmergeable. Please resolve the merge conflicts.

@alexcrichton
Copy link
Member

Thanks for the PR! @steveklabnik just to clarify, this was the intention to have a separate submodule? I was wondering if we may want to have the files included directly because Cargo's CI is much easier (lightweight) than rust-lang/rust and may not deter contributors?

@steveklabnik
Copy link
Member

Oh, so I was imagining this would be a part of rust-lang/rust like all the other bookshelf books. I would also be okay with keeping them in-tree if they're gonna stay in the Cargo repo.

If we do keep them in the cargo repo, then I think the submodule makes less sense; I may have misled you @istankovic !

@alexcrichton
Copy link
Member

Just to make sure I understand, when you say "like all the other bookshelf books" that means a git repo in rust-lang and a submodule in rust-lang/rust, right?

@steveklabnik
Copy link
Member

Just to make sure I understand, when you say "like all the other bookshelf books" that means a git repo in rust-lang and a submodule in rust-lang/rust, right?

Yes.

Thinking about it though, given that we already include Cargo as a sub-repo, I bet we could leave the docs in the cargo repo, and then have the build system look there instead. It'd be slightly weird as it'd be the only thing out of place, but would save us a repo + submodule.

@alexcrichton
Copy link
Member

Yeah that's what I figured. If that's ok @istankovic would you be ok moving over to that? (leaving docs in-repo here)

@istankovic
Copy link
Author

Sure. I guess it's also better in the sense that Cargo devs may have easier time updating the docs. I'll update the PR.

@bors
Copy link
Contributor

bors commented Jul 12, 2017

☔ The latest upstream changes (presumably #4272) made this pull request unmergeable. Please resolve the merge conflicts.

@bors
Copy link
Contributor

bors commented Aug 7, 2017

☔ The latest upstream changes (presumably #4369) made this pull request unmergeable. Please resolve the merge conflicts.

@carols10cents
Copy link
Member

carols10cents commented Aug 10, 2017

Wait, I think we want to leave the old docs around and continue publishing them to github pages until the new docs have ridden the trains to rust stable, right? So this PR should only add new files and not delete the old docs?

@carols10cents
Copy link
Member

Also there are some error messages and man pages that reference docs.crates.io:

So these URLs need to remain valid indefinitely (so people stuck on old versions of cargo can still follow them and get the docs they need)-- so we should continue serving the docs from those URLs for now, change them to redirects once this PR rides the trains to stable, and this PR should also update the URLs (and the URLs should have stable/beta/nightly in them????? or not, in which case we can't update the URLs in the code until the docs are on stable?)

@istankovic
Copy link
Author

@carols10cents:

Wait, I think we want to leave the old docs around and continue publishing them to github pages until the new docs have ridden the trains to rust stable, right? So this PR should only add new files and not delete the old docs?

Hmm, what about doc updates during that time? One would basically have to maintain the docs in two places. That does not sound optimal to me.

@carols10cents
Copy link
Member

Hmm, what about doc updates during that time? One would basically have to maintain the docs in two places. That does not sound optimal to me.

Breaking URLs doesn't sound optimal to me :)

@istankovic
Copy link
Author

Rust has broken more important things than URLs so far so... 😃

Seriously, there has to be a nicer solution.

@carols10cents
Copy link
Member

Seriously, there has to be a nicer solution.

It'll only be for like 12 weeks.

@behnam
Copy link
Contributor

behnam commented Aug 11, 2017

Based on discussion on #4040

So I'm taking over from @istankovic the migration for Cargo's docs to mdBook. Now I'm confused if we're expected to have a separate repo (cargo-book, based on https://github.com/istankovic/cargo-book/) or want to go along the approach in this PR, that creates a mdBook root under cargo repo.

@alexcrichton, @istankovic, @carols10cents?

(If we're going with a separate repo, we should close this PR and keep the discussion on #4040. If not, I'll try to rebase this work in a new PR.)

@steveklabnik
Copy link
Member

I personally don't see the need to make a new repo.

@istankovic
Copy link
Author

@behnam, thanks a lot for taking over!
The cargo-book repo contains basically the same thing as the doc-migration branch in my cargo fork. The latter is just a squashed form of the former and the book was put under doc/ (I did not think of a better place, feel free to move it). Note that the idea is to have both the mdbook and the current docs coexisting for some time in cargo, per discussion above.

@behnam
Copy link
Contributor

behnam commented Aug 12, 2017

All sounds good! I'll add a note to /src/doc/README about the migration and keeping them in sync during it.

@alexcrichton
Copy link
Member

Thanks for taking this on @behnam! And yeah keeping it all in this repo sounds good to me.

Feel free to ask with any questions!

@behnam
Copy link
Contributor

behnam commented Aug 31, 2017

We can close this PR in favor of #4453 which has more updates, and the tracker issue #4040 .

bors added a commit that referenced this pull request Aug 31, 2017
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>.
@behnam
Copy link
Contributor

behnam commented Sep 8, 2017

#reminder This can be closed now. :)

@alexcrichton
Copy link
Member

Indeed thansk @behnam!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants