Skip to content

Commit 9231df2

Browse files
arlosiehuss
andauthored
Add redirects for registry links
Co-authored-by: Eric Huss <eric@huss.org>
1 parent a71b17d commit 9231df2

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/doc/src/reference/registries.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,28 @@ token = "854DvwSlUwEHtIo3kWy6x7UCPKHfzCmy"
9999
[`cargo package`]: ../commands/cargo-package.md
100100
[`cargo login`]: ../commands/cargo-login.md
101101
[config]: config.md
102+
103+
<script>
104+
(function() {
105+
var fragments = {
106+
"#running-a-registry": "running-a-registry.html",
107+
"#index-format": "registry-index.html",
108+
"#web-api": "registry-web-api.html",
109+
"#publish": "registry-web-api.html#publish",
110+
"#yank": "registry-web-api.html#yank",
111+
"#unyank": "registry-web-api.html#unyank",
112+
"#owners": "registry-web-api.html#owners",
113+
"#owners-list": "registry-web-api.html#owners-list",
114+
"#owners-add": "registry-web-api.html#owners-add",
115+
"#owners-remove": "registry-web-api.html#owners-remove",
116+
"#search": "registry-web-api.html#search",
117+
"#login": "registry-web-api.html#login",
118+
};
119+
var target = fragments[window.location.hash];
120+
if (target) {
121+
var url = window.location.toString();
122+
var base = url.substring(0, url.lastIndexOf('/'));
123+
window.location.replace(base + "/" + target);
124+
}
125+
})();
126+
</script>

0 commit comments

Comments
 (0)