Skip to content

Commit b1bf85f

Browse files
committedFeb 10, 2021
Initial redirects to new plugin documentation
The first step of migration to JetBrains Marketplace
1 parent cc0c24e commit b1bf85f

File tree

9 files changed

+72
-234
lines changed

9 files changed

+72
-234
lines changed
 

‎_docs/editors.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<html>
2+
<head>
3+
<script src="../redirects.js"></script>
4+
<script>
5+
setupRedirects("rust-faq.html#migration");
6+
</script>
7+
</head>
8+
<body>
9+
<p>If you are not redirected, <a href="https://plugins.jetbrains.com/plugin/8182-rust/docs/rust-faq.html#migration">click here</a>.</p>
10+
</body>
11+
</html>

‎_docs/editors.markdown

Lines changed: 0 additions & 19 deletions
This file was deleted.

‎_docs/faq.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<html>
2+
<head>
3+
<script src="../redirects.js"></script>
4+
<script>
5+
setupRedirects("rust-faq.html", {
6+
"compatible-ides": "rust-faq.html#compatible-ids",
7+
"racer": "rust-faq.html#use-rls-racer-rustanalyzer",
8+
"remote": "rust-faq.html#remote",
9+
"contribute": "rust-faq.html#5bc8"
10+
});
11+
</script>
12+
</head>
13+
<body>
14+
<p>If you are not redirected, <a href="https://plugins.jetbrains.com/plugin/8182-rust/docs/rust-faq.html">click here</a>.</p>
15+
</body>
16+
</html>

‎_docs/faq.markdown

Lines changed: 0 additions & 35 deletions
This file was deleted.

‎_docs/quick-start.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<html>
2+
<head>
3+
<script src="../redirects.js"></script>
4+
<script>
5+
setupRedirects("rust-quick-start.html", {
6+
"install-plugin": "rust-quick-start.html#install-update",
7+
"create-prj": "rust-quick-start.html#create-prj",
8+
"open-prj": "rust-quick-start.html#open-clone",
9+
"settings": "rust-quick-start.html#prj-settings",
10+
"run-commands": "rust-quick-start.html#cargo-commands",
11+
"build-prj": "rust-quick-start.html#build",
12+
"run-prj": "rust-quick-start.html#run",
13+
"run-tests": "rust-quick-start.html#test",
14+
"run-debug-configs": "cargo-command-configuration.html#cargo-command-config",
15+
"coverage": "rust-code-coverage.html"
16+
});
17+
</script>
18+
</head>
19+
<body>
20+
<p>If you are not redirected, <a href="https://plugins.jetbrains.com/plugin/8182-rust/docs/rust-quick-start.html">click here</a>.</p>
21+
</body>
22+
</html>

‎_docs/quick-start.markdown

Lines changed: 0 additions & 134 deletions
This file was deleted.

‎_docs/troubleshooting.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<html>
2+
<head>
3+
<script src="../redirects.js"></script>
4+
<script>
5+
setupRedirects("rust-faq.html");
6+
</script>
7+
</head>
8+
<body>
9+
<p>If you are not redirected, <a href="https://plugins.jetbrains.com/plugin/8182-rust/docs/rust-faq.html">click here</a>.</p>
10+
</body>
11+
</html>

‎_docs/troubleshooting.markdown

Lines changed: 0 additions & 46 deletions
This file was deleted.

‎redirects.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
function setupRedirects(basePath, anchorMap = {}) {
2+
let newLocation = basePath;
3+
let hash = window.location.hash.substring(1);
4+
if (hash) {
5+
let redirect = anchorMap[hash];
6+
if (redirect) {
7+
newLocation = redirect
8+
}
9+
}
10+
11+
window.location.replace("https://plugins.jetbrains.com/plugin/8182-rust/docs/" + newLocation);
12+
}

0 commit comments

Comments
 (0)
Please sign in to comment.