Examples
The repository ships four runnable examples under examples/.
| Example | What it shows | Run from the repo root |
|---|---|---|
spa | Every plugin option, dynamic layouts and the common patterns | pnpm spa:dev |
ssg | Static site generation with vite-ssg, layout from a router guard | pnpm ssg:dev |
client-side | ClientSideLayout with every option set | pnpm cli:dev |
nested-routes | Nested routes, inheritDefaultLayout, setPageLayout on an inner layout | pnpm ner:dev |
Each example also has :build and :preview scripts, for example pnpm spa:build and pnpm spa:preview.
Building the plugin first is required, since the examples consume dist/:
bash
pnpm install
pnpm build
pnpm spa:dev