π Routing
How file system routing works
Which file is NOT special in SvelteKit?
SvelteKit Pages Cheat Sheet
β‘Bookmark the routing page from the SvelteKit Routing Docs
Page
+page.sveltemain UI for a route.+page.tsfetch data for a page, runs on client and server.+page.server.tsfetch data for a page, runs on server only.
Layout
+layout.svelteshare UI across multiple child routes.+layout.tsfetch data for a layout, runs on client and server.+layout.server.tsfetch data for a layout, runs on server only.
Server
+server.tsused to build API routes that handle different HTTP verbs and non-HTML response types.
Error
+error.sveltewill be rendered if server-side data fetching or rendering fails.