Skip to content

Commit 979d25e

Browse files
committed
Add redirect routes for /pathsim/api and /pathsim/examples, fix Get Started link
1 parent 317e153 commit 979d25e

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

src/routes/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
<Icon name="home" size={20} />
9898
<span class="action-label">Home</span>
9999
</a>
100-
<a href={packages.pathsim.docs} class="action-card">
100+
<a href="{base}/{packages.pathsim.docs}" class="action-card">
101101
<Icon name="zap" size={20} />
102102
<span class="action-label">Get Started</span>
103103
</a>

src/routes/pathsim/api/+page.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { redirect } from '@sveltejs/kit';
2+
import { base } from '$app/paths';
3+
import type { PageLoad } from './$types';
4+
5+
export const load: PageLoad = async ({ parent }) => {
6+
const { selectedTag } = await parent();
7+
throw redirect(307, `${base}/pathsim/${selectedTag}/api`);
8+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { redirect } from '@sveltejs/kit';
2+
import { base } from '$app/paths';
3+
import type { PageLoad } from './$types';
4+
5+
export const load: PageLoad = async ({ parent }) => {
6+
const { selectedTag } = await parent();
7+
throw redirect(307, `${base}/pathsim/${selectedTag}/examples`);
8+
};

0 commit comments

Comments
 (0)