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

I cannot get the new links to work #828

Closed
steveklabnik opened this issue Nov 20, 2018 · 3 comments
Closed

I cannot get the new links to work #828

steveklabnik opened this issue Nov 20, 2018 · 3 comments

Comments

@steveklabnik
Copy link
Member

I'm working on updating the rust docs to use the mdbook 0.2 series.

In #603 the new link strategy was implemented.

I can get a link to work, but then the print page is broken. See https://raw.githubusercontent.com/rust-lang/rust/master/src/doc/unstable-book/src/language-features/asm.md for example:

If you need more power and don't mind losing some of the niceties of
`asm!`, check out [global_asm](language-features/global-asm.html).

Changing this to either of

global-asm.md
../language-features/global-asm.md

means that the print page's link is broken.

@cetra3 you implemented this, and @Michael-F-Bryan you merged it. Any ideas?

@cetra3
Copy link
Contributor

cetra3 commented Nov 20, 2018

I've managed to reproduce this in some cases. It looks like the print output is not dealing with relative links, rather the output of each page is not different when printing vs. normal page output.

@steveklabnik
Copy link
Member Author

Okay, so I think, after doing some investigations, the issue is basically that:

  1. because the links used to be relative to the root, they happened to work for print.html, because it was at the site root
  2. now that links are not relative to the root, they no longer work.

This means that we need some sort of "URL normalization" pass, which has to know how to re-target all of the links in the text. And it needs to know which page they are on...

@ehuss
Copy link
Contributor

ehuss commented May 17, 2019

I believe all print links are now fixed via #866 and #871.

@ehuss ehuss closed this as completed May 17, 2019
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

No branches or pull requests

3 participants