diff --git a/src/pages/index.jsx b/src/pages/index.jsx index 43fd5d4..4cd13db 100644 --- a/src/pages/index.jsx +++ b/src/pages/index.jsx @@ -4,6 +4,19 @@ import Layout from '@theme/Layout'; import Head from '@docusaurus/Head'; import HeroCanvas from '@site/src/components/HeroCanvas'; +const REDIRECTS = { + 'tutorials': 'https://youtube.com/@8thwall', +} + +const REDIRECT_SCRIPT = ` +const sitePath = new URLSearchParams(window.location.search).get('site_path'); +const redirects = ${JSON.stringify(REDIRECTS)}; +if (sitePath && redirects[sitePath]) { + window.location.replace(redirects[sitePath]); +} +` + + export default function Home() { return ( @@ -12,6 +25,7 @@ export default function Home() { +