From 41d1a373528154c6db51406dcd019267685445de Mon Sep 17 00:00:00 2001 From: Ilia Mashkov Date: Thu, 7 May 2026 11:45:54 +0300 Subject: [PATCH] docs: add URL-driven section routing design --- ...05-07-url-driven-section-routing-design.md | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 docs/plans/2026-05-07-url-driven-section-routing-design.md diff --git a/docs/plans/2026-05-07-url-driven-section-routing-design.md b/docs/plans/2026-05-07-url-driven-section-routing-design.md new file mode 100644 index 0000000..56528be --- /dev/null +++ b/docs/plans/2026-05-07-url-driven-section-routing-design.md @@ -0,0 +1,86 @@ +# URL-Driven Section Routing — Design + +**Date:** 2026-05-07 +**Status:** Approved + +## Goal + +Replace the single-page client-state accordion with multi-page URL-driven routing. Each portfolio section gets its own static URL. The sections list remains visible at all times; clicking a section heading navigates to its page. + +## Route Structure + +Delete `app/page.tsx`. Create `app/[[...slug]]/page.tsx` (optional catchall). + +| URL | Active section | +|---|---| +| `/` | `sections[0].slug` (first section, URL stays `/`) | +| `/intro` | `intro` | +| `/bio` | `bio` | +| `/skills` | `skills` | +| `/experience` | `experience` | +| `/projects` | `projects` | + +`generateStaticParams` emits one entry per section plus the root: +```ts +[{}, { slug: ['intro'] }, { slug: ['bio'] }, ...] +``` + +## Component Changes + +### `SectionAccordion` (entity) + +- Replace `onClick: () => void` prop with `href: string` +- Inactive state: render `` instead of `