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

Fix broken link #465

Merged
merged 1 commit into from
May 21, 2020
Merged

Fix broken link #465

merged 1 commit into from
May 21, 2020

Conversation

Y-Nak
Copy link
Contributor

@Y-Nak Y-Nak commented May 21, 2020

Fix some broken internal links.

Copy link
Member

@jackh726 jackh726 left a comment

Choose a reason for hiding this comment

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

Thanks!

It's surprising to me that mdbook-linkcheck didn't pick these up. @Michael-F-Bryan

@jackh726 jackh726 merged commit 1af59b9 into rust-lang:master May 21, 2020
@Michael-F-Bryan
Copy link
Contributor

I had a look into this and don't believe mdbook-linkcheck is missing broken links here, it seems to be how browsers handle the file:// protocol and absolute links.

When you open a document from the filesystem (i.e. mdbook build --open) and click on a link to /clauses.html the browser will dutifully navigate to file:///clauses.html instead of the intended file:///home/michael/Documents/forks/chalk/book/book/clauses.html (or wherever the page happens to be). When served from a web server (i.e. mdbook serve or https://rust-lang.github.io/chalk/book/) this is all handled correctly.

Would it be worth adding some sort of "warn-on-absolute-links" check to mdbook-linkcheck to help people avoid this issue in the future?

@jackh726
Copy link
Member

A warning might be nice :)

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.

3 participants