Skip to content

Commit 54628ae

Browse files
committed
Make download link external
We need a fancy redirection page.
1 parent 54c17e3 commit 54628ae

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

home/.vitepress/config.mts

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ export default defineConfig({
3333
{
3434
text: 'Download',
3535
items: [
36-
{ text: 'Latest Stable', link: '/latest-release' },
37-
{ text: 'Latest Preview', link: '/pre-release' }
36+
{ text: 'Latest Stable', link: '/latest-release', target: '_blank' },
37+
{ text: 'Latest Preview', link: '/pre-release', target: '_blank' }
3838
]
3939
},
4040
{

home/latest-release.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: Redirecting to Latest Release...
33
layout: page
4+
sidebar: false
5+
navbar: false
46
---
57

68
<script setup>
@@ -14,12 +16,9 @@ if (typeof window !== 'undefined') {
1416
const releases = await response.json();
1517
const latestRelease = releases.find(release => !release.prerelease);
1618
const latestReleaseUrl = latestRelease ? latestRelease.html_url : "#";
17-
window.open(latestReleaseUrl, "_blank");
18-
window.location.href = "/";
19+
window.location.href = latestReleaseUrl;
1920
} catch (error) {
2021
console.error("Error fetching latest release:", error);
21-
await delay(5000)
22-
window.location.href = "/";
2322
}
2423
};
2524

home/pre-release.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: Redirecting to Pre-Release...
33
layout: page
4+
sidebar: false
5+
navbar: false
46
---
57

68
<script setup>
@@ -14,12 +16,9 @@ if (typeof window !== 'undefined') {
1416
const releases = await response.json();
1517
const preRelease = releases.find(release => release.prerelease);
1618
const preReleaseUrl = preRelease ? preRelease.html_url : "#";
17-
window.open(preReleaseUrl, "_blank");
18-
window.location.href = "/";
19+
window.location.href = preReleaseUrl;
1920
} catch (error) {
2021
console.error("Error fetching pre-release:", error);
21-
await delay(5000)
22-
window.location.href = "/";
2322
}
2423
};
2524

0 commit comments

Comments
 (0)