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

Upgrades for mdbook 0.2.0, and link style cleanup. #391

Closed
wants to merge 5 commits into from

Conversation

alercah
Copy link
Contributor

@alercah alercah commented Aug 7, 2018

See individual commit messages for description of what I did.

I have not verified all links. mdbook-linkcheck does not yet support 0.2.0.

@alercah alercah requested a review from Havvy August 7, 2018 08:57
Copy link
Contributor

@Havvy Havvy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few nits and questions.

src/expressions/array-expr.md Outdated Show resolved Hide resolved
src/items/traits.md Show resolved Hide resolved
src/items/type-aliases.md Outdated Show resolved Hide resolved
src/items/unions.md Outdated Show resolved Hide resolved
src/expressions.md Outdated Show resolved Hide resolved
src/items.md Outdated Show resolved Hide resolved
src/types.md Outdated Show resolved Hide resolved
@Havvy
Copy link
Contributor

Havvy commented Aug 9, 2018

Oh, I commented on commits as I checked on each commit. Thus some stuff says out of date even though it's not.

@Havvy Havvy added the Enhancement Improvement in a non-prose section of the book label Aug 15, 2018
@Havvy
Copy link
Contributor

Havvy commented Sep 20, 2018

This needs to be rebased pretty badly. I think it'd be easier if the alphabetizing commit was its own PR.

@alercah
Copy link
Contributor Author

alercah commented Jan 27, 2019

Rebased and updated, removed the sorting/organization and just stuck on the version upgrade.

@alercah
Copy link
Contributor Author

alercah commented Jan 27, 2019

@steveklabnik

@ehuss
Copy link
Contributor

ehuss commented Jan 28, 2019

These links don't look correct to me. They should all be relative to the page they are on. For example, introduction.md has a bunch of ../ links that should not have ../. If you visit the page here on Github, none of the links are working.

There also looks to be some unintended changes to // comments in operator-expr.md.

@ehuss
Copy link
Contributor

ehuss commented Jan 28, 2019

Oh, .travis.yml will need to be updated, too.

@steveklabnik
Copy link
Member

I'm running linkcheck on this right now, but I suspect @ehuss is correct.

@steveklabnik
Copy link
Member

Oh shucks, it looks like the upstream PR for multi-mdbook support has not actually landed. I thought it had. Let me take care of that ASAP.

@steveklabnik
Copy link
Member

Now r+'d rust-lang/rust#57495

@alercah
Copy link
Contributor Author

alercah commented Jan 29, 2019

@ehuss Ah right, I thought I reverted all the ones outside of subdirs since I did them by mistake, but missed introduction.md. I fixed some I missed too that linkcheck found.

Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the links to .html in-repo need to be updated to .md. This allows links to work on GitHub, and mdbook doesn't handle the .html links properly in the print page (all links not in the root are currently broken on the print page).

src/expressions/array-expr.md Outdated Show resolved Hide resolved
.travis.yml Outdated
@@ -4,7 +4,7 @@ rust:
- nightly

install:
- travis_retry curl -Lf https://github.com/rust-lang-nursery/mdBook/releases/download/v0.1.7/mdbook-v0.1.7-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=$HOME/.cargo/bin
- travis_retry curl -Lf https://github.com/rust-lang-nursery/mdBook/releases/download/v0.2.1/mdbook-v0.2.1-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=$HOME/.cargo/bin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, hmm, this needs to be 0.2.3. @steveklabnik would it be possible to publish a binary for the latest release on github?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how to do this. @Michael-F-Bryan ?

@steveklabnik
Copy link
Member

steveklabnik commented Jan 29, 2019

So, I have good news, and I have bad news. Good news is, I ran this against upstream's linkchecker. Bad news is that I got:

reference\expressions\array-expr.html:225: broken link - reference\std\ops\trait.Index.html
reference\expressions\array-expr.html:225: broken link - reference\std\ops\trait.IndexMut.html
reference\print.html:2243: broken link - identifiers.html
reference\print.html:2244: broken link - identifiers.html
reference\print.html:2245: broken link - attributes.html
reference\print.html:2246: broken link - items.html
reference\print.html:2249: broken link - items.html
reference\print.html:2280: broken link - paths.html
reference\print.html:2345: broken link - crates-and-source-files.html
reference\print.html:2347: broken link - crates-and-source-files.html
reference\print.html:2348: broken link - attributes.html
reference\print.html:2353: broken link - conditional-compilation.html
reference\print.html:2354: broken link - attributes.html
reference\print.html:2354: broken link - attributes.html
reference\print.html:2354: broken link - attributes.html
reference\print.html:2362: broken link - identifiers.html
reference\print.html:2364: broken link - identifiers.html
reference\print.html:2367: broken link - identifiers.html
reference\print.html:2376: broken link - identifiers.html
reference\print.html:2400: broken link - crates-and-source-files.html
reference\print.html:2401: broken link - items\modules.html
reference\print.html:2405: broken link - items\use-declarations.html
reference\print.html:2407: broken link - items\use-declarations.html
reference\print.html:2432: broken link - attributes.html
reference\print.html:2440: broken link - paths.html
reference\print.html:2441: broken link - paths.html
reference\print.html:2442: broken link - paths.html
reference\print.html:2442: broken link - identifiers.html

reference\print.html:6145: broken link - C:\Users\steve\src\jamesrust\build\x86_64-pc-windows-msvc\std\ops\trait.Fn.html
reference\print.html:6145: broken link - C:\Users\steve\src\jamesrust\build\x86_64-pc-windows-msvc\std\ops\trait.FnMut.html
reference\print.html:6146: broken link - C:\Users\steve\src\jamesrust\build\x86_64-pc-windows-msvc\std\ops\trait.FnOnce.html

reference\print.html:8032: broken link - C:\Users\steve\src\jamesrust\build\x86_64-pc-windows-msvc\std\ops\trait.Fn.html
reference\print.html:8032: broken link - C:\Users\steve\src\jamesrust\build\x86_64-pc-windows-msvc\std\ops\trait.FnMut.html
reference\print.html:8032: broken link - C:\Users\steve\src\jamesrust\build\x86_64-pc-windows-msvc\std\ops\trait.FnOnce.html
reference\print.html:8032: broken link - special-types-and-traits.html
reference\print.html:8033: broken link - special-types-and-traits.html
reference\print.html:8033: broken link - special-types-and-traits.html
reference\print.html:8033: broken link - special-types-and-traits.html
reference\print.html:8035: broken link - expressions\closure-expr.html
reference\print.html:8134: broken link - C:\Users\steve\src\jamesrust\build\x86_64-pc-windows-msvc\std\ops\trait.FnOnce.html
reference\print.html:8140: broken link - C:\Users\steve\src\jamesrust\build\x86_64-pc-windows-msvc\std\ops\trait.FnMut.html
reference\print.html:8144: broken link - C:\Users\steve\src\jamesrust\build\x86_64-pc-windows-msvc\std\ops\trait.Fn.html
reference\print.html:8148: broken link - C:\Users\steve\src\jamesrust\build\x86_64-pc-windows-msvc\std\ops\trait.Fn.html
reference\print.html:8148: broken link - C:\Users\steve\src\jamesrust\build\x86_64-pc-windows-msvc\std\ops\trait.FnMut.html

reference\print.html:7914: broken link - C:\Users\steve\src\jamesrust\build\x86_64-pc-windows-msvc\std\vec\struct.Vec.html

... and more, but I won't paste the same line about print.html over and over again...

I am very confused about print.html, because I did rust-lang/mdBook#866 to fix this.

@steveklabnik
Copy link
Member

All of the links to .html in-repo need to be updated to .md. This allows links to work on GitHub, and mdbook doesn't handle the .html links properly in the print page (all links not in the root are currently broken on the print page).

ahhhhhh yes

@steveklabnik
Copy link
Member

The upstream PR has landed! @alercah let me know when you want me to try the linkchecker again :)

@alercah
Copy link
Contributor Author

alercah commented Feb 2, 2019

Apologies for the delay here, had some issues. Should be good to go now, though I can't get linkcheck to ignore the parent directories so I can't be totally sure.

@ehuss
Copy link
Contributor

ehuss commented Feb 2, 2019

Hm, something's wrong. I swore I tested the print page on 0.2.3, but there are still problems. There are two issues:

  • Links like items/unions.md jump out of the print page. I would assume the 0.1 behavior should be retained where the print page links to itself.
  • Links like ../../std/mem/fn.discriminant.html are not rebased when used from a subdirectory, and are broken.

I'll see if I can figure out what's wrong in the next few days.

@ehuss
Copy link
Contributor

ehuss commented Feb 3, 2019

I have posted a proposed fix for the print.html links at rust-lang/mdBook#871.

As for publishing 0.2.3, it looks like the deploy scripts are broken (travis and appveyor). I have posted a partial fix for Travis at rust-lang/mdBook#872. The API keys need to be fixed since the transition to travis.com. @steveklabnik if you have permissions, can you take care of that? Or if not, I can try to bug infra and get things worked out. Alternatively the releases can be made manually (it's just a compressed copy of the mdbook executable), and uploaded manually on the GitHub releases page.

@Havvy Havvy self-requested a review March 25, 2019 07:13
@mati865
Copy link

mati865 commented Jul 7, 2019

There is mdbook 0.3 so this should be unblocked but there are so many conflicts and new links this PR probably has to be redone from scratch.

@ehuss
Copy link
Contributor

ehuss commented Jul 7, 2019

@mati865 There was another bug blocking the update of the reference and cargo (rust-lang/mdBook#963). It is now fixed, I just need to make a new release. I'll be posting a new PR here to replace this one when things are ready. It will require a coordinated update due to some changes to anchor tags. I think I'll be able to eradicate 0.1 during that update.

@ehuss
Copy link
Contributor

ehuss commented Jul 16, 2019

I'm going to close this for now. The reference has been updated to mdbook 0.3 in #641. If there are any link cleanups we want to do, we can always do them in future PRs. Thanks @alercah, sorry it took so long to iron out all the kinks in mdbook to make this work.

@ehuss ehuss closed this Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement in a non-prose section of the book
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants