File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ const REDIRECTS = {
2+ 'tutorials' : 'https://youtube.com/@8thwall' ,
3+ 'twainxreducation/brandigno' : 'https://twainxreducation.8thwall.app/brandigno/' ,
4+ 'contact' : '#get-involved' ,
5+ 'forum' : '#get-involved' ,
6+ }
7+
8+ const REDIRECT_SCRIPT = `
9+ const sitePath = new URLSearchParams(window.location.search).get('site_path');
10+ const redirects = ${ JSON . stringify ( REDIRECTS ) } ;
11+ if (sitePath && redirects[sitePath]) {
12+ window.location.replace(redirects[sitePath]);
13+ }
14+ `
15+
16+ export {
17+ REDIRECT_SCRIPT
18+ }
Original file line number Diff line number Diff line change @@ -3,20 +3,7 @@ import Link from '@docusaurus/Link';
33import Layout from '@theme/Layout' ;
44import Head from '@docusaurus/Head' ;
55import HeroCanvas from '@site/src/components/HeroCanvas' ;
6-
7- const REDIRECTS = {
8- 'tutorials' : 'https://youtube.com/@8thwall' ,
9- 'twainxreducation/brandigno' : 'https://twainxreducation.8thwall.app/brandigno/' ,
10- }
11-
12- const REDIRECT_SCRIPT = `
13- const sitePath = new URLSearchParams(window.location.search).get('site_path');
14- const redirects = ${ JSON . stringify ( REDIRECTS ) } ;
15- if (sitePath && redirects[sitePath]) {
16- window.location.replace(redirects[sitePath]);
17- }
18- `
19-
6+ import { REDIRECT_SCRIPT } from './_redirects'
207
218export default function Home ( ) {
229 return (
You can’t perform that action at this time.
0 commit comments