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

Usages of the <base> tag causes confusion #279

Closed
frewsxcv opened this issue May 17, 2017 · 6 comments
Closed

Usages of the <base> tag causes confusion #279

frewsxcv opened this issue May 17, 2017 · 6 comments
Labels
A-HTML Area: HTML Rendering C-papercut Category: A small usability bug

Comments

@frewsxcv
Copy link
Member

Thought I'd document a painpoint we encountered: rust-lang/rust#41476 (comment)

@frewsxcv
Copy link
Member Author

Anyone have opinions about removing <base>? Is that a lot of work?

@azerupi azerupi added A-HTML Area: HTML Rendering C-papercut Category: A small usability bug labels May 17, 2017
@azerupi
Copy link
Contributor

azerupi commented May 17, 2017

So <base> is in place to always make internal links start from the root. In my opinion this is easier to reason about and less prone to invalid links when you move around some chapters.

I am not opposed to remove it, but then maybe we would need to process internal links during the build phase to make them start from the root?

@AndyGauge
Copy link
Contributor

At Rust Cookbook, while trying to implement link checkers in the CI, we were hard pressed to find one that accepted <base href="../">. Both html-proofer and w3 validators fail to process the links.

https://validator.w3.org/checklink?uri=https%3A%2F%2Fdoc.rust-lang.org%2Fstable%2Frust-by-example%2Fhello%2Fprint.html&hide_type=all&depth=&check=Check demonstrates some of the output we were seeing. Currently, @budziq is writing a link checker that accepts base href='../' as valid, but it is my thinking that if w3 validators are failing, it might be malformed.

@Michael-F-Bryan
Copy link
Contributor

I believe this should be resolved by #603. We're planning to migrate away from the base tag and instead all links will be relative to their parent directory.

@AndyGauge
Copy link
Contributor

@Michael-F-Bryan I was planning on testing #603 against the cookbook this weekend but ran into all kinds of technical issues. I suspected it would resolve my issues, and I'm thankful you clarified that for me.

@badboy
Copy link
Member

badboy commented Sep 19, 2018

This is now fixed by #603 and should be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-HTML Area: HTML Rendering C-papercut Category: A small usability bug
Projects
None yet
Development

No branches or pull requests

5 participants