Opynicus · 像素书房
正在加载书房…
CENOVIEL
cenoviel — zsh ⌘
cenoviel@midnight~/borrowed-timelocal · accidental railway
# just checking the files. what could go wrong?
❯sl
Developer docs+
‹›⌕ docs / routing
▰ SvelteKit☰
DOCS / CORE CONCEPTS
Routing
Build pages with a filesystem-based router.
Creating a page
Each route is a directory. Add a page to start rendering your content.
src/routes/
+page.svelte
+layout.svelte
blog/
+page.svelte Loading data
A load function prepares data before the page is displayed.
export async function
load() {
return {
title: 'Hello'
};
} TIP
Keep shared data in a layout.
Keep shared data in a layout.
Navigation
Move between pages with a regular link.
<a href="/blog"> Read the journal </a>
Next steps
Explore layouts, route parameters and page options.
Layouts →







