This repository was archived by the owner on Sep 30, 2020. It is now read-only.
Retaining the fragment identifier when redirecting#992
Merged
alexcrichton merged 1 commit intorust-lang:masterfrom Jan 4, 2018
Merged
Retaining the fragment identifier when redirecting#992alexcrichton merged 1 commit intorust-lang:masterfrom
alexcrichton merged 1 commit intorust-lang:masterfrom
Conversation
Currently, if a user requests /team.html#foo and is redirected to the sv-SE language, the new location will be /sv-SE/team.html. This commit appends the fragment identifier to the redirection target. Thus, if a user is requesting /team.html#foo and is redirected to the sv-SE language, the new location will be /sv-SE/team.html#foo.
kennytm
added a commit
to kennytm/rust
that referenced
this pull request
Dec 23, 2017
…-link, r=kennytm Fixing Rust Moderation Team link in Code of Conduct The [Code of Conduct](https://github.com/rust-lang/rust/blob/master/CODE_OF_CONDUCT.md) has two broken links to the Rust Moderation Team. - The current link is https://github.com/rust-lang/rust/blob/master/team.html#Moderation. That happened because the link is relative. - The link in this PR is https://www.rust-lang.org/team.html#Moderation-team. Note: at the moment this is redirected client-side to a language-specific page and loses the fragment identifier. rust-lang/prev.rust-lang.org#992 aims to correct that.
kennytm
added a commit
to kennytm/rust
that referenced
this pull request
Dec 23, 2017
…-link, r=kennytm Fixing Rust Moderation Team link in Code of Conduct The [Code of Conduct](https://github.com/rust-lang/rust/blob/master/CODE_OF_CONDUCT.md) has two broken links to the Rust Moderation Team. - The current link is https://github.com/rust-lang/rust/blob/master/team.html#Moderation. That happened because the link is relative. - The link in this PR is https://www.rust-lang.org/team.html#Moderation-team. Note: at the moment this is redirected client-side to a language-specific page and loses the fragment identifier. rust-lang/prev.rust-lang.org#992 aims to correct that.
kennytm
added a commit
to kennytm/rust
that referenced
this pull request
Dec 26, 2017
…-link, r=kennytm Fixing Rust Moderation Team link in Code of Conduct The [Code of Conduct](https://github.com/rust-lang/rust/blob/master/CODE_OF_CONDUCT.md) has two broken links to the Rust Moderation Team. - The current link is https://github.com/rust-lang/rust/blob/master/team.html#Moderation. That happened because the link is relative. - The link in this PR is https://www.rust-lang.org/team.html#Moderation-team. Note: at the moment this is redirected client-side to a language-specific page and loses the fragment identifier. rust-lang/prev.rust-lang.org#992 aims to correct that.
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes the site redirect to propagate fragment identifiers when redirecting. For example, the US English conduct page contains a link to https://www.rust-lang.org/team.html#Moderation. If you navigate to that, the client-side redirect code will send you to a language-specific destination with #Moderation removed. A link followed on an instance of the site that has this change will have #Moderation after the redirect.
Note that #Moderation is not the correct anchor, so clicking on it will land you at the top of the Team Page. That is being corrected in #991.