summaryrefslogtreecommitdiff
path: root/docs/src/pages/index.astro
diff options
context:
space:
mode:
Diffstat (limited to 'docs/src/pages/index.astro')
-rw-r--r--docs/src/pages/index.astro7
1 files changed, 3 insertions, 4 deletions
diff --git a/docs/src/pages/index.astro b/docs/src/pages/index.astro
index ed0831cbd..203ed38cf 100644
--- a/docs/src/pages/index.astro
+++ b/docs/src/pages/index.astro
@@ -2,6 +2,7 @@
import Layout from '../layouts/MainLayout.astro';
---
+<meta http-equiv="refresh" content="5;url=/en/getting-started">
<script>
// WIP: trigger a client-side redirect based on the browser language.
// A vercel.json redirect is enforced in production, so no user should ever see this page.
@@ -27,13 +28,11 @@ import Layout from '../layouts/MainLayout.astro';
'en-US'
).substr(0, 5);
let newLang = newLangWithRegion.substr(0, 2);
- if (newLang === 'en') {
- window.location.pathname = '/getting-started';
- } else if (KNOWN_LANGUAGES.includes(newLangWithRegion)) {
+ if (KNOWN_LANGUAGES.includes(newLangWithRegion)) {
window.location.pathname = '/' + newLangWithRegion + '/getting-started';
} else if (KNOWN_LANGUAGES.includes(newLang)) {
window.location.pathname = '/' + newLang + '/getting-started';
} else {
- window.location.pathname = '/getting-started';
+ window.location.pathname = '/en/getting-started';
}
</script>