폴더명 - 페이지 이름
about
+layout.svelte
+page.svelte

ex => http://localhost:5173/about
페이지 내 정보 가져와서 적용함
price
[urlId]
+page.svelte

<script>
import { page } from '$app/stores';
const productId = $page.params.productId;
</script>
<h1>상품{productId} 상세페이지</h1>
해당 폴더 내 라우팅
first, second
+page.svelte

[...slug], [[lang]]

[...slug] 설정
<script type="ts">
import { page } from '$app/stores';
const slugId = $page.params.slug.split('/');
console.log(slugId);
</script>
<h1>Docs 페이지</h1>
{#if slugId.length === 1}
<h1>주제 {slugId[0]}</h1>
{:else if slugId.length === 2}
<h2>소주제 {slugId[1]}</h2>
{/if}
[[lang]] 설정
<script type="ts">
import { page } from '$app/stores';
const slugId = $page.params.slug.split('/');
console.log($page);
const { lang = 'ko' } = $page.params;
</script>
<h1>Doc 페이지</h1>
{#if lang === 'ko'}
<h2>안녕</h2>
{:else if lang === 'en'}
<h2>hi</h2>
{:else if lang === 'ja'}
<h2>일본어</h2>
{/if}
ex => http://localhost:5173/docs/en
http://localhost:5173/docs/ja
<a href="/">home</a>
<a href="/about">about</a>
<a href="/products">products</a>
<a href="/blog/first">/blog/first</a>
<a href="/docs">docs</a>
<a href="/doc">doc</a>
<a href="/price">price</a>
<a href="/price-server">price-server</a>
<slot><!-- optional fallback --></slot>
src-parmas-interger.js
네이게이션에 숫자만 사용
export function match(param) {
return /^\d+$/.test(param);
}
[폴더명=integer]

ex => http://localhost:5173/products/1
http://localhost:5173/products/dfjkh] - 텍스트 사용시 에러

ex => http://localhost:5173/login
ex => http://localhost:5173/
+page@(auth).svelte
-> 상위 레이아웃을 따라서 정의
+page@.svelte