← Basics

File-based routing

Folders in src/routes become URLs.

In SvelteKit every folder inside src/routes is a URL. A +page.svelte file is the page itself.

A folder named [slug] is a dynamic segment: /articles/hello and /articles/world both use the same file, and the value arrives in params.slug.

A +layout.svelte wraps every page below it, which is perfect for a shared header and footer.