Skip to content

Commit

Permalink
fix: mobile nav links to SvelteKit tutorials (#830)
Browse files Browse the repository at this point in the history
Fixes #829. Pointing the link to the right place seemed like the correct way to address this, not fixing the redirects.
  • Loading branch information
Conduitry authored Nov 12, 2024
1 parent bda251e commit 2e91d80
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/svelte.dev/src/routes/+layout.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ const nav_links: NavigationLink[] = [
title: section.metadata.title,
sections: section.children.map((page) => ({
title: page.metadata.title,
path: '/tutorial/' + page.slug.split('/').pop()
path:
'/tutorial/' +
(page.slug.includes('sveltekit/') ? 'kit' : 'svelte') +
'/' +
page.slug.split('/').pop()
}))
}))
}))
Expand Down

0 comments on commit 2e91d80

Please sign in to comment.