Routing
Halite uses file-based routing: the path of a file under src/pages/ is its URL.
File | Route |
|---|---|
|
|
|
|
|
|
| Any depth |
Dynamic routes
---
export function getStaticPaths() {
return [{ params: { slug: 'hello' } }, { params: { slug: 'world' } }];
}
const { slug } = Halite.params;
---
<h1>{slug}</h1>Updated
Was this page helpful?