mirror of
https://github.com/gkd-kit/docs.git
synced 2024-11-16 04:52:20 +08:00
fix: 404 /subscription/
This commit is contained in:
parent
212218324c
commit
e8f7e49f82
|
@ -5,11 +5,15 @@ import components from '../components';
|
|||
import './custom.css';
|
||||
|
||||
// Redirect /selector/* to /guide/*
|
||||
if (!import.meta.env.SSR && location.pathname.startsWith('/selector/')) {
|
||||
if (location.pathname.at(-1) === '/') {
|
||||
location.pathname = '/guide/selector';
|
||||
} else {
|
||||
location.pathname = location.pathname.replace('/selector/', '/guide/');
|
||||
if (!import.meta.env.SSR) {
|
||||
if (location.pathname.startsWith('/selector/')) {
|
||||
if (location.pathname.at(-1) === '/') {
|
||||
location.pathname = '/guide/selector';
|
||||
} else {
|
||||
location.pathname = location.pathname.replace('/selector/', '/guide/');
|
||||
}
|
||||
} else if ((location.pathname = '/subscription/')) {
|
||||
location.pathname = '/guide/subscription';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user