diff options
author | 2022-02-07 13:39:53 -0500 | |
---|---|---|
committer | 2022-02-07 13:39:53 -0500 | |
commit | a911d14eabe4f4f9080b59b1c292818ea2ca6123 (patch) | |
tree | 529fdda395eedc122955fd2851954d61554869b4 /docs/src/pages/index.astro | |
parent | 2bc91543ceeb5f3dd45e201bf75d79f186e85141 (diff) | |
download | astro-a911d14eabe4f4f9080b59b1c292818ea2ca6123.tar.gz astro-a911d14eabe4f4f9080b59b1c292818ea2ca6123.tar.zst astro-a911d14eabe4f4f9080b59b1c292818ea2ca6123.zip |
Remove docs from monorepo (#2517)
* Remove docs from monorepo
* Update PULL_REQUEST_TEMPLATE.md
* Update relative doc references with links or todo
Diffstat (limited to 'docs/src/pages/index.astro')
-rw-r--r-- | docs/src/pages/index.astro | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/docs/src/pages/index.astro b/docs/src/pages/index.astro deleted file mode 100644 index 203ed38cf..000000000 --- a/docs/src/pages/index.astro +++ /dev/null @@ -1,38 +0,0 @@ ---- -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. - // Remove the vercel.json redirect when this is ready. - const KNOWN_LANGUAGES = [ - 'bg', - 'de', - 'en', - 'es', - 'fi', - 'nl', - 'pt-br', - 'zh-CN', - 'zh-TW', - 'fr', - 'kr', - 'da', - 'ja', - ]; - let newLangWithRegion = ( - window.navigator.userLanguage || - window.navigator.language || - 'en-US' - ).substr(0, 5); - let newLang = newLangWithRegion.substr(0, 2); - 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 = '/en/getting-started'; - } -</script> |