Skip to content

Commit 2e91d80

Browse files
authored
fix: mobile nav links to SvelteKit tutorials (#830)
Fixes #829. Pointing the link to the right place seemed like the correct way to address this, not fixing the redirects.
1 parent bda251e commit 2e91d80

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

apps/svelte.dev/src/routes/+layout.server.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ const nav_links: NavigationLink[] = [
2828
title: section.metadata.title,
2929
sections: section.children.map((page) => ({
3030
title: page.metadata.title,
31-
path: '/tutorial/' + page.slug.split('/').pop()
31+
path:
32+
'/tutorial/' +
33+
(page.slug.includes('sveltekit/') ? 'kit' : 'svelte') +
34+
'/' +
35+
page.slug.split('/').pop()
3236
}))
3337
}))
3438
}))

0 commit comments

Comments
 (0)