Skip to content
Kinley Rabgay.

Next.js / Sanity / Design systems

Rebuilding my portfolio: everything editable, nothing invented.

Notes from rebuilding kinleyrabgay.com on Next.js 16 and Sanity - subdomains for sites I sell, a CMS behind every word, and three bugs that only showed up once real content arrived.

Kinley Rabgay2 min read
The kinleyrabgay.com home page with the name set large.

My old portfolio did its job, but every change meant a code change, and parts of it had quietly gone stale. I rebuilt it with three rules: research every section against real products before designing it, keep every word editable in a CMS, and never show a number or a claim I cannot back up.

Research before pixels

Each section started with references from real sites rather than a blank canvas - the article layout from publications, the experience timeline from the way companies group roles, the footer from studio sites. It slowed the first draft down and sped up every revision, because a decision had a reason I could point to.

Sites I sell, each on its own subdomain

Some of what I build is for sale, and a buyer should be able to try a site live. Next.js 16 replaces middleware with proxy.ts, which made this a few lines: a request for slug.kinleyrabgay.com is rewritten to a preview route for that site.

ts
// proxy.ts (simplified)
const sub = subdomainOf(host); // "lumen.kinleyrabgay.com" -> "lumen"
if (sub && sub !== "www") {
  url.pathname = `/preview/${sub}`;
  return NextResponse.rewrite(url);
}

A CMS behind every word

Projects, posts, jobs, services, tools, section headings, page titles, the resume PDF - all of it lives in Sanity now. Each list falls back to built-in content while its type is empty, and one published document switches it over, so the site never renders blank while content is being moved in.

Three bugs real content found

The first was images. Case-study screenshots were 2880 pixels wide and up to 4.4 MB each, and the default image optimizer stalled resizing them on first request - some covers rendered blank. A custom image loader now asks Sanity's image CDN for the exact width and a modern format instead. One cover went from 4.4 MB to 28 KB.

The second was scrolling that sometimes did nothing. The smooth-scroll library needs its own stylesheet, and it had never been loaded, so it and native scrolling fought each other now and then. One import fixed it.

The third was a hand-tuned pixel offset on the timeline dots that drifted a few pixels off their line. The fix was to stop doing arithmetic: the dot and the line now share one centred column, and the dot box is exactly one title line tall.

Rules that kept it clean

Every file stays under 100 lines, which forces small components with one job. Shared pieces - section bodies, sub-headers, buttons, tags - live in one place so every section lines up on the same grid. And a lint rule bans the long dash, because a portfolio should sound like the person who wrote it.

The most useful rule was the last one I listed at the start: nothing invented. Placeholder numbers and sample credentials are easy to leave in. Taking them out made the site smaller and a lot more honest.

Keep reading

Contact

.

Open to freelance, contract and full-time roles - product builds, design systems, and full-stack work from idea to production.

hello@kinleyrabgay.com